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 intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final StringPrep -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intprivate static intstatic StringBufferconvertIDNToASCII(String src, int options) static StringBufferconvertIDNToUnicode(String src, int options) static StringBufferconvertToASCII(UCharacterIterator src, int options) static StringBufferconvertToUnicode(UCharacterIterator src, int options) private static intgetSeparatorIndex(char[] src, int start, int limit) private static booleanisLabelSeparator(int ch) Ascertain if the given code point is a label separator as defined by the IDNA RFCprivate static booleanisLDHChar(int ch) private static booleanprivate static chartoASCIILower(char ch) private static StringBuffertoASCIILower(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
-