|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.util.DNUtils
public class DNUtils
Utility class used by the LdapDN Parser.
Field Summary | |
---|---|
static int |
BAD_HEX_PAIR
If an hex pair contains only one char, this value is returned |
static String |
OID_LOWER
"oid." static |
static byte[] |
OID_LOWER_BYTES
"oid." static |
static String |
OID_UPPER
"OID." static |
static byte[] |
OID_UPPER_BYTES
"OID." static |
static int |
ONE_BYTE
A constant representing one byte length |
static int |
ONE_CHAR
A constant representing one char length |
static int |
PARSING_ERROR
A value if we got an error while parsing |
static int |
PARSING_OK
A value if we got a correct parsing |
static int |
TWO_BYTES
A constant representing two bytes length |
static int |
TWO_CHARS
A constant representing two chars length |
Constructor Summary | |
---|---|
DNUtils()
|
Method Summary | |
---|---|
static boolean |
isPairChar(byte[] byteArray,
int index)
Check if the current character is a Pair Char <pairchar> ::= ',' | '=' | '+' | '<' | '>' | '#' | ';' | '\' | '"' | [0-9a-fA-F] [0-9a-fA-F] |
static boolean |
isPairChar(char[] charArray,
int index)
Check if the current character is a Pair Char <pairchar> ::= ',' | '=' | '+' | '<' | '>' | '#' | ';' | '\' | '"' | [0-9a-fA-F] [0-9a-fA-F] |
static int |
isPairChar(String string,
int index)
Check if the current character is a Pair Char <pairchar> ::= ' ' | ',' | '=' | '+' | '<' | '>' | '#' | ';' | '\' | '"' | [0-9a-fA-F] [0-9a-fA-F] |
static int |
isQuoteChar(byte[] byteArray,
int index)
Check if the current character is a Quote Char We are testing Unicode chars <quotechar> ::= [0x00-0xFFFF] - [\"] |
static int |
isQuoteChar(char[] charArray,
int index)
Check if the current character is a Quote Char We are testing Unicode chars <quotechar> ::= [0x00-0xFFFF] - [\"] |
static int |
isQuoteChar(String string,
int index)
Check if the current character is a Quote Char We are testing Unicode chars <quotechar> ::= [0x00-0xFFFF] - [\"] |
static int |
isStringChar(byte[] byteArray,
int index)
Check if the current character is a String Char. |
static int |
isStringChar(char[] charArray,
int index)
Check if the current character is a String Char. |
static int |
isStringChar(String string,
int index)
Check if the current character is a String Char. |
static int |
parseAlphaASCII(byte[] byteArray,
int index)
Walk the buffer while characters are Alpha characters : <alpha> ::= [0x41-0x5A] | [0x61-0x7A] |
static int |
parseAlphaASCII(char[] charArray,
int index)
Walk the buffer while characters are Alpha characters : <alpha> ::= [0x41-0x5A] | [0x61-0x7A] |
static int |
parseBase64String(byte[] byteArray,
int index)
Walk the buffer while characters are Base64 characters : <base64-string> ::= <base64-char> <base64-chars> <base64-chars> ::= <base64-char> <base64-chars> | <base64-char> ::= 0x2B | 0x2F | [0x30-0x39] | 0x3D | [0x41-0x5A] | [0x61-0x7A] |
static int |
parseHexPair(byte[] byteArray,
int index)
Parse an hex pair <hexpair> ::= <hex> <hex> |
static int |
parseHexPair(char[] charArray,
int index)
Parse an hex pair <hexpair> ::= <hex> <hex> |
static int |
parseHexPair(String string,
int index)
Parse an hex pair <hexpair> ::= <hex> <hex> |
static int |
parseHexString(byte[] byteArray,
int index)
Parse an hex string, which is a list of hex pairs <hexstring> ::= <hexpair> <hexpairs> <hexpairs> ::= <hexpair> <hexpairs> | e |
static int |
parseHexString(char[] charArray,
int index)
Parse an hex string, which is a list of hex pairs <hexstring> ::= <hexpair> <hexpairs> <hexpairs> ::= <hexpair> <hexpairs> | e |
static int |
parseHexString(String string,
byte[] hex,
Position pos)
Parse an hex string, which is a list of hex pairs <hexstring> ::= <hexpair> <hexpairs> <hexpairs> ::= <hexpair> <hexpairs> | e |
static int |
parseHexString(String string,
Position pos)
Parse an hex string, which is a list of hex pairs <hexstring> ::= <hexpair> <hexpairs> <hexpairs> ::= <hexpair> <hexpairs> | e |
static int |
parseSafeString(byte[] byteArray,
int index)
Walk the buffer while characters are Safe String characters : <safe-string> ::= <safe-init-char> <safe-chars> <safe-init-char> ::= [0x01-0x09] | 0x0B | 0x0C | [0x0E-0x1F] | [0x21-0x39] | 0x3B | [0x3D-0x7F] <safe-chars> ::= <safe-char> <safe-chars> | <safe-char> ::= [0x01-0x09] | 0x0B | 0x0C | [0x0E-0x7F] |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PARSING_ERROR
public static final int PARSING_OK
public static final int BAD_HEX_PAIR
public static final int ONE_CHAR
public static final int TWO_CHARS
public static final int ONE_BYTE
public static final int TWO_BYTES
public static final String OID_LOWER
public static final String OID_UPPER
public static final byte[] OID_LOWER_BYTES
public static final byte[] OID_UPPER_BYTES
Constructor Detail |
---|
public DNUtils()
Method Detail |
---|
public static int parseSafeString(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseAlphaASCII(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseAlphaASCII(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
public static boolean isPairChar(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
true
if the current character is a Pair Charpublic static boolean isPairChar(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
true
if the current character is a Pair Charpublic static int isPairChar(String string, int index)
string
- The string which contains the dataindex
- Current position in the string
true
if the current character is a Pair Charpublic static int isStringChar(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int isStringChar(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int isStringChar(String string, int index)
string
- The string which contains the dataindex
- Current position in the string
public static int isQuoteChar(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
true
if the current character is a Quote Charpublic static int isQuoteChar(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
true
if the current character is a Quote Charpublic static int isQuoteChar(String string, int index)
string
- The string which contains the dataindex
- Current position in the string
true
if the current character is a Quote Charpublic static int parseHexPair(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseHexPair(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseHexPair(String string, int index)
string
- The string which contains the dataindex
- Current position in the string
public static int parseHexString(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseHexString(char[] charArray, int index)
charArray
- The buffer which contains the dataindex
- Current position in the buffer
public static int parseHexString(String string, Position pos)
string
- The string which contains the datapos
- Current position in the string
public static int parseHexString(String string, byte[] hex, Position pos)
string
- The string which contains the datahex
- The result as a byte arraypos
- Current position in the string
public static int parseBase64String(byte[] byteArray, int index)
byteArray
- The buffer which contains the dataindex
- Current position in the buffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |