Package com.ibm.icu.impl
Class IDNA2003
java.lang.Object
com.ibm.icu.impl.IDNA2003
IDNA2003 implementation code, moved out of com.ibm.icu.text.IDNA.java
while extending that class to support IDNA2008/UTS #46 as well.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static char[]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final StringPrep
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
private static int
static StringBuffer
convertIDNToASCII
(String src, int options) static StringBuffer
convertIDNToUnicode
(String src, int options) static StringBuffer
convertToASCII
(UCharacterIterator src, int options) static StringBuffer
convertToUnicode
(UCharacterIterator src, int options) private static int
getSeparatorIndex
(char[] src, int start, int limit) private static boolean
isLabelSeparator
(int ch) Ascertain if the given code point is a label separator as defined by the IDNA RFCprivate static boolean
isLDHChar
(int ch) private static boolean
private static char
toASCIILower
(char ch) private static StringBuffer
toASCIILower
(CharSequence src)
-
Field Details
-
ACE_PREFIX
private static char[] ACE_PREFIX -
MAX_LABEL_LENGTH
private static final int MAX_LABEL_LENGTH- See Also:
-
HYPHEN
private static final int HYPHEN- See Also:
-
CAPITAL_A
private static final int CAPITAL_A- See Also:
-
CAPITAL_Z
private static final int CAPITAL_Z- See Also:
-
LOWER_CASE_DELTA
private static final int LOWER_CASE_DELTA- See Also:
-
FULL_STOP
private static final int FULL_STOP- See Also:
-
MAX_DOMAIN_NAME_LENGTH
private static final int MAX_DOMAIN_NAME_LENGTH- See Also:
-
namePrep
-
-
Constructor Details
-
IDNA2003
public IDNA2003()
-
-
Method Details
-
startsWithPrefix
-
toASCIILower
private static char toASCIILower(char ch) -
toASCIILower
-
compareCaseInsensitiveASCII
-
getSeparatorIndex
private static int getSeparatorIndex(char[] src, int start, int limit) -
isLDHChar
private static boolean isLDHChar(int ch) -
isLabelSeparator
private static boolean isLabelSeparator(int ch) Ascertain if the given code point is a label separator as defined by the IDNA RFC- Parameters:
ch
- The code point to be ascertained- Returns:
- true if the char is a label separator
-
convertToASCII
public static StringBuffer convertToASCII(UCharacterIterator src, int options) throws StringPrepParseException - Throws:
StringPrepParseException
-
convertIDNToASCII
public static StringBuffer convertIDNToASCII(String src, int options) throws StringPrepParseException - Throws:
StringPrepParseException
-
convertToUnicode
public static StringBuffer convertToUnicode(UCharacterIterator src, int options) throws StringPrepParseException - Throws:
StringPrepParseException
-
convertIDNToUnicode
public static StringBuffer convertIDNToUnicode(String src, int options) throws StringPrepParseException - Throws:
StringPrepParseException
-
compare
- Throws:
StringPrepParseException
-