List of usage examples for javax.naming.ldap Rdn unescapeValue
public static Object unescapeValue(String val)
From source file:UnescapingValues.java
public static void main(String args[]) { // DN with ',' (comma) String unformatted = "Juicy, Fruit"; String formatted = Rdn.escapeValue(unformatted); System.out.println("Formatted:" + formatted); Object original = Rdn.unescapeValue(formatted); System.out.println("Original:" + original); // DN with a '+' (plus) unformatted = "true+false"; formatted = Rdn.escapeValue(unformatted); System.out.println("Formatted:" + formatted); original = Rdn.unescapeValue(formatted); System.out.println("Original:" + original); // DN with a binary value as one one of its attribute value byte[] bytes = new byte[] { 1, 2, 3, 4 }; formatted = Rdn.escapeValue(bytes); System.out.println("Formatted:" + formatted); original = Rdn.unescapeValue(formatted); System.out.println("Original:" + original); }