public class LdapNameFormatter extends java.lang.Object implements NameFormatter
| Modifier and Type | Field and Description |
|---|---|
static char |
ATV_SEPARATOR
Separator character between ATV components in the same RDN element.
|
private static HexEncoder |
ENCODER
Handles hex encoding.
|
static char |
ESCAPE_CHAR
Escape character.
|
static char |
RDN_SEPARATOR
Separator character between RDN components.
|
static java.lang.String |
RESERVED_CHARS
String of characters that need to be escaped.
|
| Constructor and Description |
|---|
LdapNameFormatter() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
encode(java.lang.String value,
java.lang.StringBuilder output)
Appends the given value to the output using the HEX encoding method described in section 2.4.
|
private static void |
escape(java.lang.String value,
java.lang.StringBuilder output)
Appends the given value to the output with proper character escaping.
|
java.lang.String |
format(javax.security.auth.x500.X500Principal dn)
Produces a string representation of the given X.500 principal.
|
public static final char RDN_SEPARATOR
public static final char ATV_SEPARATOR
public static final char ESCAPE_CHAR
public static final java.lang.String RESERVED_CHARS
private static final HexEncoder ENCODER
public java.lang.String format(javax.security.auth.x500.X500Principal dn)
NameFormatterformat in interface NameFormatterdn - Distinguished name as as X.500 principal.private static void escape(java.lang.String value,
java.lang.StringBuilder output)
value - Value to escape.output - String builder where escaped value is written.private static void encode(java.lang.String value,
java.lang.StringBuilder output)
value - Value to encode.output - String builder where encoded value is written.