Class UTS46
java.lang.Object
com.ibm.icu.text.IDNA
com.ibm.icu.impl.UTS46
-
Nested Class Summary
Nested classes/interfaces inherited from class IDNA
IDNA.Error, IDNA.Info -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final int(package private) final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final EnumSet<IDNA.Error> private static intprivate static final Normalizer2Fields inherited from class IDNA
ALLOW_UNASSIGNED, CHECK_BIDI, CHECK_CONTEXTJ, CHECK_CONTEXTO, DEFAULT, NONTRANSITIONAL_TO_ASCII, NONTRANSITIONAL_TO_UNICODE, USE_STD3_RULES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckLabelBiDi(CharSequence label, int labelStart, int labelLength, IDNA.Info info) private voidcheckLabelContextO(CharSequence label, int labelStart, int labelLength, IDNA.Info info) private static booleanisASCIIOkBiDi(CharSequence s, int length) private static booleanisASCIIString(CharSequence dest) private booleanisLabelOkContextJ(CharSequence label, int labelStart, int labelLength) labelToASCII(CharSequence label, StringBuilder dest, IDNA.Info info) Converts a single domain name label into its ASCII form for DNS lookup.labelToUnicode(CharSequence label, StringBuilder dest, IDNA.Info info) Converts a single domain name label into its Unicode form for human-readable display.private intmapDevChars(StringBuilder dest, int labelStart, int mappingStart) private intmarkBadACELabel(StringBuilder dest, int labelStart, int labelLength, boolean toASCII, IDNA.Info info) nameToASCII(CharSequence name, StringBuilder dest, IDNA.Info info) Converts a whole domain name into its ASCII form for DNS lookup.nameToUnicode(CharSequence name, StringBuilder dest, IDNA.Info info) Converts a whole domain name into its Unicode form for human-readable display.private StringBuilderprocess(CharSequence src, boolean isLabel, boolean toASCII, StringBuilder dest, IDNA.Info info) private intprocessLabel(StringBuilder dest, int labelStart, int labelLength, boolean toASCII, IDNA.Info info) private StringBuilderprocessUnicode(CharSequence src, int labelStart, int mappingStart, boolean isLabel, boolean toASCII, StringBuilder dest, IDNA.Info info) private static intreplaceLabel(StringBuilder dest, int destLabelStart, int destLabelLength, CharSequence label, int labelLength) private static booleanprivate static intU_GET_GC_MASK(int c) private static intU_MASK(int x) Methods inherited from class IDNA
addError, addLabelError, compare, compare, compare, convertIDNToASCII, convertIDNToASCII, convertIDNToASCII, convertIDNToUnicode, convertIDNToUnicode, convertIDNToUnicode, convertToASCII, convertToASCII, convertToASCII, convertToUnicode, convertToUnicode, convertToUnicode, getUTS46Instance, hasCertainErrors, hasCertainLabelErrors, isBiDi, isOkBiDi, promoteAndResetLabelErrors, resetInfo, setBiDi, setNotOkBiDi, setTransitionalDifferent
-
Field Details
-
uts46Norm2
-
options
final int options -
severeErrors
-
asciiData
private static final byte[] asciiData -
L_MASK
private static final int L_MASK -
R_AL_MASK
private static final int R_AL_MASK -
L_R_AL_MASK
private static final int L_R_AL_MASK -
R_AL_AN_MASK
private static final int R_AL_AN_MASK -
EN_AN_MASK
private static final int EN_AN_MASK -
R_AL_EN_AN_MASK
private static final int R_AL_EN_AN_MASK -
L_EN_MASK
private static final int L_EN_MASK -
ES_CS_ET_ON_BN_NSM_MASK
private static final int ES_CS_ET_ON_BN_NSM_MASK -
L_EN_ES_CS_ET_ON_BN_NSM_MASK
private static final int L_EN_ES_CS_ET_ON_BN_NSM_MASK -
R_AL_AN_EN_ES_CS_ET_ON_BN_NSM_MASK
private static final int R_AL_AN_EN_ES_CS_ET_ON_BN_NSM_MASK -
U_GC_M_MASK
private static int U_GC_M_MASK
-
-
Constructor Details
-
UTS46
public UTS46(int options)
-
-
Method Details
-
labelToASCII
Description copied from class:IDNAConverts a single domain name label into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The label might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.- Specified by:
labelToASCIIin classIDNA- Parameters:
label- Input domain name labeldest- Destination string objectinfo- Output container of IDNA processing details.- Returns:
- dest
-
labelToUnicode
Description copied from class:IDNAConverts a single domain name label into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The label might be modified according to the types of errors.- Specified by:
labelToUnicodein classIDNA- Parameters:
label- Input domain name labeldest- Destination string objectinfo- Output container of IDNA processing details.- Returns:
- dest
-
nameToASCII
Description copied from class:IDNAConverts a whole domain name into its ASCII form for DNS lookup. If any processing step fails, then info.hasErrors() will be true and the result might not be an ASCII string. The domain name might be modified according to the types of errors. Labels with severe errors will be left in (or turned into) their Unicode form.- Specified by:
nameToASCIIin classIDNA- Parameters:
name- Input domain namedest- Destination string objectinfo- Output container of IDNA processing details.- Returns:
- dest
-
nameToUnicode
Description copied from class:IDNAConverts a whole domain name into its Unicode form for human-readable display. If any processing step fails, then info.hasErrors() will be true. The domain name might be modified according to the types of errors.- Specified by:
nameToUnicodein classIDNA- Parameters:
name- Input domain namedest- Destination string objectinfo- Output container of IDNA processing details.- Returns:
- dest
-
isASCIIString
-
process
private StringBuilder process(CharSequence src, boolean isLabel, boolean toASCII, StringBuilder dest, IDNA.Info info) -
processUnicode
private StringBuilder processUnicode(CharSequence src, int labelStart, int mappingStart, boolean isLabel, boolean toASCII, StringBuilder dest, IDNA.Info info) -
mapDevChars
-
replaceLabel
private static int replaceLabel(StringBuilder dest, int destLabelStart, int destLabelLength, CharSequence label, int labelLength) -
processLabel
private int processLabel(StringBuilder dest, int labelStart, int labelLength, boolean toASCII, IDNA.Info info) -
startsWithXNDashDash
-
markBadACELabel
private int markBadACELabel(StringBuilder dest, int labelStart, int labelLength, boolean toASCII, IDNA.Info info) -
checkLabelBiDi
-
isASCIIOkBiDi
-
isLabelOkContextJ
-
checkLabelContextO
private void checkLabelContextO(CharSequence label, int labelStart, int labelLength, IDNA.Info info) -
U_MASK
private static int U_MASK(int x) -
U_GET_GC_MASK
private static int U_GET_GC_MASK(int c)
-