jdk/src/share/classes/com/sun/jndi/ldap/LdapName.java
changeset 25808 e113d0a0fde0
parent 23010 6dadb192ad81
equal deleted inserted replaced
25807:6c325960c9ee 25808:e113d0a0fde0
   344     public static String escapeAttributeValue(Object val) {
   344     public static String escapeAttributeValue(Object val) {
   345         return TypeAndValue.escapeValue(val);
   345         return TypeAndValue.escapeValue(val);
   346     }
   346     }
   347 
   347 
   348     /**
   348     /**
   349      * Given an attribute value formated according to RFC 2253,
   349      * Given an attribute value formatted according to RFC 2253,
   350      * returns the unformated value.  Returns a string value as
   350      * returns the unformatted value.  Returns a string value as
   351      * a string, and a binary value as a byte array.
   351      * a string, and a binary value as a byte array.
   352      */
   352      */
   353     public static Object unescapeAttributeValue(String val) {
   353     public static Object unescapeAttributeValue(String val) {
   354         return TypeAndValue.unescapeValue(val);
   354         return TypeAndValue.unescapeValue(val);
   355     }
   355     }
   685         private final String type;
   685         private final String type;
   686         private final String value;             // value, escaped or quoted
   686         private final String value;             // value, escaped or quoted
   687         private final boolean binary;
   687         private final boolean binary;
   688         private final boolean valueCaseSensitive;
   688         private final boolean valueCaseSensitive;
   689 
   689 
   690         // If non-null, a canonical represention of the value suitable
   690         // If non-null, a canonical representation of the value suitable
   691         // for comparison using String.compareTo().
   691         // for comparison using String.compareTo().
   692         private String comparable = null;
   692         private String comparable = null;
   693 
   693 
   694         TypeAndValue(String type, String value, boolean valueCaseSensitive) {
   694         TypeAndValue(String type, String value, boolean valueCaseSensitive) {
   695             this.type = type;
   695             this.type = type;
   840 
   840 
   841             return (new String(buf)).toUpperCase(Locale.ENGLISH);
   841             return (new String(buf)).toUpperCase(Locale.ENGLISH);
   842         }
   842         }
   843 
   843 
   844         /*
   844         /*
   845          * Given an attribute value formated according to RFC 2253,
   845          * Given an attribute value formatted according to RFC 2253,
   846          * returns the unformated value.  Escapes and quotes are
   846          * returns the unformatted value.  Escapes and quotes are
   847          * stripped away, and hex-encoded UTF-8 is converted to 16-bit
   847          * stripped away, and hex-encoded UTF-8 is converted to 16-bit
   848          * Unicode chars.  Returns a string value as a String, and a
   848          * Unicode chars.  Returns a string value as a String, and a
   849          * binary value as a byte array.
   849          * binary value as a byte array.
   850          */
   850          */
   851         static Object unescapeValue(String val) {
   851         static Object unescapeValue(String val) {