public final class PrepareString extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PrepareString.AssertionType
The type of Assertion we have to normalize
|
private static class |
PrepareString.NormStateEnum |
| Modifier and Type | Field and Description |
|---|---|
private static ArrayIndexOutOfBoundsException |
AIOOBE
An exception used to get out of the map method quickly
|
static boolean |
CASE_SENSITIVE
A flag used to lowercase chars during the map process
|
static boolean |
IGNORE_CASE
A flag used to keep casing during the map process
|
| Modifier | Constructor and Description |
|---|---|
private |
PrepareString()
A private constructor, to avoid instance creation of this static class.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
checkProhibited(char c)
Prohibit characters described in RFC 4518 :
- Table A.1 of RFC 3454
- Table C.3 of RFC 3454
- Table C.4 of RFC 3454
- Table C.5 of RFC 3454
- Table C.8 of RFC 3454
- character U-FFFD
|
static void |
checkProhibited(char[] value)
Check that the String does not contain any prohibited char
|
static String |
insignificantNumericStringHandling(char[] source)
Remove all insignificant spaces in a numeric string.
|
static String |
insignificantSpacesStringAny(char[] origin)
Remove all insignificant spaces in a Any assertion.
|
static String |
insignificantSpacesStringFinal(char[] origin)
Remove all insignificant spaces in a string.
|
static String |
insignificantSpacesStringInitial(char[] origin)
Remove all insignificant spaces in a Initial assertion.
|
static String |
insignificantSpacesStringValue(char[] origin)
Remove all insignificant spaces in a string.
|
static String |
insignificantTelephoneNumberStringHandling(char[] source)
Remove all insignificant spaces in a TelephoneNumber string,
Hyphen and spaces.
|
static String |
mapCaseSensitive(String unicode)
Apply the RFC 4518 MAP transformation, case sensitive
|
private static String |
mapCaseSensitiveAscii(String unicode)
Map for Ascii String, case sensitive
|
static String |
mapIgnoreCase(String unicode)
Apply the RFC 4518 MAP transformation, case insensitive
|
private static String |
mapIgnoreCaseAscii(String unicode)
Map for Ascii String, case insensitive
|
static String |
normalize(String value)
Normalize a String
|
static String |
transcode(byte[] bytes)
The first step defined by RFC 4518 : Transcode, which transform an
UTF-8 encoded String to Unicode.
|
public static final boolean CASE_SENSITIVE
public static final boolean IGNORE_CASE
private static final ArrayIndexOutOfBoundsException AIOOBE
private PrepareString()
public static String transcode(byte[] bytes)
Strings.utf8ToString(byte[])
method. Thisbytes - The byte[] to transcodepublic static String normalize(String value)
value - the value to normalizepublic static String mapCaseSensitive(String unicode)
unicode - The original Stringpublic static void checkProhibited(char[] value)
throws org.apache.directory.api.util.exception.InvalidCharacterException
value - The String to analyzeorg.apache.directory.api.util.exception.InvalidCharacterException - If any character is prohibitedprivate static void checkProhibited(char c)
throws org.apache.directory.api.util.exception.InvalidCharacterException
c - The char to analyzeorg.apache.directory.api.util.exception.InvalidCharacterException - If any character is prohibitedpublic static String insignificantNumericStringHandling(char[] source)
source - The numeric Stringpublic static String insignificantTelephoneNumberStringHandling(char[] source)
source - The telephoneNumber Stringpublic static String insignificantSpacesStringValue(char[] origin)
origin - The String to modifypublic static String insignificantSpacesStringInitial(char[] origin)
origin - The String to modifypublic static String insignificantSpacesStringAny(char[] origin)
origin - The String to modifypublic static String insignificantSpacesStringFinal(char[] origin)
origin - The String to modifyprivate static String mapIgnoreCaseAscii(String unicode)
unicode - The string to mapprivate static String mapCaseSensitiveAscii(String unicode)
unicode - The string to re-mapCopyright © 2003–2019 The Apache Software Foundation. All rights reserved.