Package netscape.ldap.client
Class JDAPFilterOpers
java.lang.Object
netscape.ldap.client.JDAPFilterOpers
This class provides miscellaneous operations for JDAPFilter object.
It converts string with escape characters to the byte array. It also
returns the ber octet string for the specified string with escape
characters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertLDAPv2Escape
(String filter) Preprocess the LDAPv2 RFC1960 style filter escape sequences (precede a character with a a backslash) and convert them into the LDAPv3 style RFC2254 escape sequences (encode a character as a backslash followed by the two hex digits representing the character ASCII value).(package private) static byte[]
getByteValues
(String str) This method converts the given string into bytes.(package private) static BEROctetString
getOctetString
(String str) Returns the octetString for the given stringprivate static boolean
isHexDigit
(char c) private static void
printDebug
(String str) Print debug message
-
Field Details
-
escapeKey
- See Also:
-
m_debug
private static final boolean m_debug- See Also:
-
-
Constructor Details
-
JDAPFilterOpers
public JDAPFilterOpers()
-
-
Method Details
-
getOctetString
Returns the octetString for the given string- Returns:
- The octetString for the given string
-
convertLDAPv2Escape
Preprocess the LDAPv2 RFC1960 style filter escape sequences (precede a character with a a backslash) and convert them into the LDAPv3 style RFC2254 escape sequences (encode a character as a backslash followed by the two hex digits representing the character ASCII value). LDAPv3 style unescaping is done from the getByteValues()method. We must process LDAPv2 escaped characters earlier to get rid of possible "\(" \)" sequences which would make filter parsing in the JDAPFilter operate incorrectly. -
isHexDigit
private static boolean isHexDigit(char c) -
getByteValues
This method converts the given string into bytes. It also handles the escape characters embedded in the given string.- Parameters:
str
- The given string being converted into a byte array- Returns:
- A byte array
-
printDebug
Print debug message
-