Package com.ibm.icu.text
Enum IDNA.Error
- java.lang.Object
-
- java.lang.Enum<IDNA.Error>
-
- com.ibm.icu.text.IDNA.Error
-
- All Implemented Interfaces:
Serializable,Comparable<IDNA.Error>
- Enclosing class:
- IDNA
public static enum IDNA.Error extends Enum<IDNA.Error>
IDNA error bit set values. When a domain name or label fails a processing step or does not meet the validity criteria, then one or more of these error bits are set.- Status:
- Stable ICU 4.6.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIDIA label does not meet the IDNA BiDi requirements (for right-to-left characters).CONTEXTJA label does not meet the IDNA CONTEXTJ requirements.CONTEXTO_DIGITSA label does not meet the IDNA CONTEXTO requirements for digits.CONTEXTO_PUNCTUATIONA label does not meet the IDNA CONTEXTO requirements for punctuation characters.DISALLOWEDA label or domain name contains disallowed characters.DOMAIN_NAME_TOO_LONGA domain name is longer than 255 bytes in its storage form.EMPTY_LABELA non-final domain name label (or the whole domain name) is empty.HYPHEN_3_4A label contains hyphen-minus ('-') in the third and fourth positions.INVALID_ACE_LABELAn ACE label does not contain a valid label string.LABEL_HAS_DOTA label contains a dot=full stop.LABEL_TOO_LONGA domain name label is longer than 63 bytes.LEADING_COMBINING_MARKA label starts with a combining mark.LEADING_HYPHENA label starts with a hyphen-minus ('-').PUNYCODEA label starts with "xn--" but does not contain valid Punycode.TRAILING_HYPHENA label ends with a hyphen-minus ('-').
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IDNA.ErrorvalueOf(String name)Returns the enum constant of this type with the specified name.static IDNA.Error[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EMPTY_LABEL
public static final IDNA.Error EMPTY_LABEL
A non-final domain name label (or the whole domain name) is empty.- Status:
- Stable ICU 4.6.
-
LABEL_TOO_LONG
public static final IDNA.Error LABEL_TOO_LONG
A domain name label is longer than 63 bytes. (See STD13/RFC1034 3.1. Name space specifications and terminology.) This is only checked in ToASCII operations, and only if the output label is all-ASCII.- Status:
- Stable ICU 4.6.
-
DOMAIN_NAME_TOO_LONG
public static final IDNA.Error DOMAIN_NAME_TOO_LONG
A domain name is longer than 255 bytes in its storage form. (See STD13/RFC1034 3.1. Name space specifications and terminology.) This is only checked in ToASCII operations, and only if the output domain name is all-ASCII.- Status:
- Stable ICU 4.6.
-
LEADING_HYPHEN
public static final IDNA.Error LEADING_HYPHEN
A label starts with a hyphen-minus ('-').- Status:
- Stable ICU 4.6.
-
TRAILING_HYPHEN
public static final IDNA.Error TRAILING_HYPHEN
A label ends with a hyphen-minus ('-').- Status:
- Stable ICU 4.6.
-
HYPHEN_3_4
public static final IDNA.Error HYPHEN_3_4
A label contains hyphen-minus ('-') in the third and fourth positions.- Status:
- Stable ICU 4.6.
-
LEADING_COMBINING_MARK
public static final IDNA.Error LEADING_COMBINING_MARK
A label starts with a combining mark.- Status:
- Stable ICU 4.6.
-
DISALLOWED
public static final IDNA.Error DISALLOWED
A label or domain name contains disallowed characters.- Status:
- Stable ICU 4.6.
-
PUNYCODE
public static final IDNA.Error PUNYCODE
A label starts with "xn--" but does not contain valid Punycode. That is, an xn-- label failed Punycode decoding.- Status:
- Stable ICU 4.6.
-
LABEL_HAS_DOT
public static final IDNA.Error LABEL_HAS_DOT
A label contains a dot=full stop. This can occur in an input string for a single-label function.- Status:
- Stable ICU 4.6.
-
INVALID_ACE_LABEL
public static final IDNA.Error INVALID_ACE_LABEL
An ACE label does not contain a valid label string. The label was successfully ACE (Punycode) decoded but the resulting string had severe validation errors. For example, it might contain characters that are not allowed in ACE labels, or it might not be normalized.- Status:
- Stable ICU 4.6.
-
BIDI
public static final IDNA.Error BIDI
A label does not meet the IDNA BiDi requirements (for right-to-left characters).- Status:
- Stable ICU 4.6.
-
CONTEXTJ
public static final IDNA.Error CONTEXTJ
A label does not meet the IDNA CONTEXTJ requirements.- Status:
- Stable ICU 4.6.
-
CONTEXTO_PUNCTUATION
public static final IDNA.Error CONTEXTO_PUNCTUATION
A label does not meet the IDNA CONTEXTO requirements for punctuation characters. Some punctuation characters "Would otherwise have been DISALLOWED" but are allowed in certain contexts. (RFC 5892)- Status:
- Stable ICU 49.
-
CONTEXTO_DIGITS
public static final IDNA.Error CONTEXTO_DIGITS
A label does not meet the IDNA CONTEXTO requirements for digits. Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic-Indic Digits (U+06Fx).- Status:
- Stable ICU 49.
-
-
Method Detail
-
values
public static IDNA.Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IDNA.Error c : IDNA.Error.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IDNA.Error valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-