Top Description Fields Constructors Methods
com.ibm.icu.impl

public final Class IDNA2003

extends Object
Class Inheritance
Imports
com.ibm.icu.text.IDNA, .StringPrep, .StringPrepParseException, .UCharacterIterator

IDNA2003 implementation code, moved out of com.ibm.icu.text.IDNA.java while extending that class to support IDNA2008/UTS #46 as well.
Author
Ram Viswanadha

Field Summary

Modifier and TypeField and Description
private 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

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int
compare(String s1, String s2, int options)

private static int
public static StringBuffer
convertIDNToASCII(String src, int options)

public static StringBuffer
convertIDNToUnicode(String src, int options)

public static StringBuffer
public static StringBuffer
private static int
getSeparatorIndex(char[] src, int start, int limit)

private static boolean

Returns:

true if the char is a label separator
isLabelSeparator
(int
The code point to be ascertained
ch
)

Ascertain if the given code point is a label separator as defined by the IDNA RFC

private static boolean
isLDHChar(int ch)

private static boolean
private static char
toASCIILower(char ch)

private static StringBuffer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ACE_PREFIXback to summary
private static char[] ACE_PREFIX
CAPITAL_Aback to summary
private static final int CAPITAL_A
CAPITAL_Zback to summary
private static final int CAPITAL_Z
FULL_STOPback to summary
private static final int FULL_STOP
HYPHENback to summary
private static final int HYPHEN
LOWER_CASE_DELTAback to summary
private static final int LOWER_CASE_DELTA
MAX_DOMAIN_NAME_LENGTHback to summary
private static final int MAX_DOMAIN_NAME_LENGTH
MAX_LABEL_LENGTHback to summary
private static final int MAX_LABEL_LENGTH
namePrepback to summary
private static final StringPrep namePrep

Constructor Detail

IDNA2003back to summary
public IDNA2003()

Method Detail

compareback to summary
public static int compare(String s1, String s2, int options) throws StringPrepParseException
compareCaseInsensitiveASCIIback to summary
private static int compareCaseInsensitiveASCII(StringBuffer s1, StringBuffer s2)
convertIDNToASCIIback to summary
public static StringBuffer convertIDNToASCII(String src, int options) throws StringPrepParseException
convertIDNToUnicodeback to summary
public static StringBuffer convertIDNToUnicode(String src, int options) throws StringPrepParseException
convertToASCIIback to summary
public static StringBuffer convertToASCII(UCharacterIterator src, int options) throws StringPrepParseException
convertToUnicodeback to summary
public static StringBuffer convertToUnicode(UCharacterIterator src, int options) throws StringPrepParseException
getSeparatorIndexback to summary
private static int getSeparatorIndex(char[] src, int start, int limit)
isLabelSeparatorback to summary
private static boolean isLabelSeparator(int ch)

Ascertain if the given code point is a label separator as defined by the IDNA RFC

Parameters
ch:int

The code point to be ascertained

Returns:boolean

true if the char is a label separator

ICU Status
Stable since ICU 2.8.
isLDHCharback to summary
private static boolean isLDHChar(int ch)
startsWithPrefixback to summary
private static boolean startsWithPrefix(StringBuffer src)
toASCIILowerback to summary
private static char toASCIILower(char ch)
toASCIILowerback to summary
private static StringBuffer toASCIILower(CharSequence src)