| Modifier and Type | Class and Description | 
|---|---|
private static class  | 
DnParser.OctetStringHandler
Parse handler for decoding octet strings. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
private static int | 
HEX_RADIX
Hexadecimal radix. 
 | 
private static Logger | 
LOGGER
Logger for this class. 
 | 
| Modifier | Constructor and Description | 
|---|---|
private  | 
DnParser()
Default constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static List<LdapAttribute> | 
convertDnToAttributes(String dn)
Parses the supplied DN and converts each RDN into a  
LdapAttribute. | 
protected static byte[] | 
decodeHexValue(char[] value)
Decodes the supplied hexadecimal value. 
 | 
protected static String | 
decodeStringValue(String value)
Decodes the supplied string attribute value. 
 | 
static String | 
getValue(String dn,
        String name)
Returns the RDN value for the attribute type with the supplied name. 
 | 
static Collection<String> | 
getValues(String dn,
         String name)
Returns the RDN values for the attribute type with the supplied name. 
 | 
private static int | 
readToChar(String s,
          char[] chars,
          int pos)
Reads the supplied string starting at the supplied position until one of the supplied characters is found. 
 | 
static String | 
substring(String dn,
         int beginIndex)
Returns a string representation of the supplied DN beginning at the supplied index. 
 | 
static String | 
substring(String dn,
         int beginIndex,
         int endIndex)
Returns a string representation of the supplied DN beginning at beginIndex (inclusive) and ending at endIndex
 (exclusive). 
 | 
private static final Logger LOGGER
private static final int HEX_RADIX
public static Collection<String> getValues(String dn, String name)
dn - to parsename - of the attribute type to return values forpublic static String getValue(String dn, String name)
dn - to parsename - of the attribute to return value forpublic static String substring(String dn, int beginIndex)
dn - to parsebeginIndex - index of first RDN to include in the result in the range [0, N-1] where N is the number of
                     elements in the DNIndexOutOfBoundsException - if beginIndex is less than 0 or greater than the number of RDNspublic static String substring(String dn, int beginIndex, int endIndex)
dn - to parsebeginIndex - index of first RDN to include in the result in the range [0, N-2] where N is the number of
                     elements in the DNendIndex - index of last RDN to include in the result in the range [1, N-1] where N is the number of
                   elements in the RDNIndexOutOfBoundsException - if beginIndex is less than 0, if beginIndex is greater than endIndex, or
 endIndex is greater than the number of RDNspublic static List<LdapAttribute> convertDnToAttributes(String dn)
LdapAttribute.dn - to parseprotected static byte[] decodeHexValue(char[] value)
value - hex to decodeprotected static String decodeStringValue(String value)
value - to decodeprivate static int readToChar(String s, char[] chars, int pos)
s - to readchars - to matchpos - to start reading atCopyright © 2003-2019 Virginia Tech. All Rights Reserved.