Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Enums](https://developer.android.com/reference/android/icu/text/IDNA.Error#enumconstants) \| [Methods](https://developer.android.com/reference/android/icu/text/IDNA.Error#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/text/IDNA.Error#inhmethods)

# IDNA.Error

*** ** * ** ***

` public static final enum IDNA.Error `   
` ` ` extends https://developer.android.com/reference/java/lang/Enum<https://developer.android.com/reference/android/icu/text/IDNA.Error> ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.lang.Enum](https://developer.android.com/reference/java/lang/Enum)\<[android.icu.text.IDNA.Error](https://developer.android.com/reference/android/icu/text/IDNA.Error)\> ||
|   | ↳ | android.icu.text.IDNA.Error |

<br />

*** ** * ** ***

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.

## Summary

| ### Enum values ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `BIDI` A label does not meet the IDNA BiDi requirements (for right-to-left characters). |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `CONTEXTJ` A label does not meet the IDNA CONTEXTJ requirements. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `CONTEXTO_DIGITS` A label does not meet the IDNA CONTEXTO requirements for digits. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `CONTEXTO_PUNCTUATION` A label does not meet the IDNA CONTEXTO requirements for punctuation characters. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `DISALLOWED` A label or domain name contains disallowed characters. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `DOMAIN_NAME_TOO_LONG` A domain name is longer than 255 bytes in its storage form. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `EMPTY_LABEL` A non-final domain name label (or the whole domain name) is empty. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `HYPHEN_3_4` A label contains hyphen-minus ('-') in the third and fourth positions. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `INVALID_ACE_LABEL` An ACE label does not contain a valid label string. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `LABEL_HAS_DOT` A label contains a dot=full stop. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `LABEL_TOO_LONG` A domain name label is longer than 63 bytes. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `LEADING_COMBINING_MARK` A label starts with a combining mark. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `LEADING_HYPHEN` A label starts with a hyphen-minus ('-'). |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `PUNYCODE` A label starts with "xn--" but does not contain valid Punycode. |
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | `TRAILING_HYPHEN` A label ends with a hyphen-minus ('-'). |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/icu/text/IDNA.Error` | ` https://developer.android.com/reference/android/icu/text/IDNA.Error#valueOf(java.lang.String)(https://developer.android.com/reference/java/lang/String name) ` |
| ` static final https://developer.android.com/reference/android/icu/text/IDNA.Error` | ` https://developer.android.com/reference/android/icu/text/IDNA.Error#values()() ` |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Enum ` ` final https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Enum#clone()() `

Throws CloneNotSupportedException.
` final int` ` https://developer.android.com/reference/java/lang/Enum#compareTo(E)(https://developer.android.com/reference/android/icu/text/IDNA.Error o) `

Compares this enum with the specified object for order.
` final boolean` ` https://developer.android.com/reference/java/lang/Enum#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object other) `

Returns true if the specified object is equal to this enum constant.
` final void` ` https://developer.android.com/reference/java/lang/Enum#finalize()() `

enum classes cannot have finalize methods.
` final https://developer.android.com/reference/java/lang/Class<https://developer.android.com/reference/android/icu/text/IDNA.Error>` ` https://developer.android.com/reference/java/lang/Enum#getDeclaringClass()() `

Returns the Class object corresponding to this enum constant's enum type.
` final int` ` https://developer.android.com/reference/java/lang/Enum#hashCode()() `

Returns a hash code for this enum constant.
` final https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Enum#name()() `

Returns the name of this enum constant, exactly as declared in its enum declaration.
` final int` ` https://developer.android.com/reference/java/lang/Enum#ordinal()() `

Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Enum#toString()() `

Returns the name of this enum constant, as contained in the declaration.
` static <T extends https://developer.android.com/reference/java/lang/Enum<T>> T` ` https://developer.android.com/reference/java/lang/Enum#valueOf(java.lang.Class<T>,%20java.lang.String)(https://developer.android.com/reference/java/lang/Class<T> enumClass, https://developer.android.com/reference/java/lang/String name) `

Returns the enum constant of the specified enum class with the specified name.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/java/lang/Comparable ` ` abstract int` ` https://developer.android.com/reference/java/lang/Comparable#compareTo(T)(https://developer.android.com/reference/android/icu/text/IDNA.Error o) `

Compares this object with the specified object for order.

## Enum values

### BIDI

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error BIDI
```

A label does not meet the IDNA BiDi requirements (for right-to-left characters).

<br />

### CONTEXTJ

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error CONTEXTJ
```

A label does not meet the IDNA CONTEXTJ requirements.

<br />

### CONTEXTO_DIGITS

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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).

<br />

### CONTEXTO_PUNCTUATION

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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)

<br />

### DISALLOWED

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error DISALLOWED
```

A label or domain name contains disallowed characters.

<br />

### DOMAIN_NAME_TOO_LONG

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### EMPTY_LABEL

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error EMPTY_LABEL
```

A non-final domain name label (or the whole domain name) is empty.

<br />

### HYPHEN_3_4

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error HYPHEN_3_4
```

A label contains hyphen-minus ('-') in the third and fourth positions.

<br />

### INVALID_ACE_LABEL

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### LABEL_HAS_DOT

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### LABEL_TOO_LONG

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### LEADING_COMBINING_MARK

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error LEADING_COMBINING_MARK
```

A label starts with a combining mark.

<br />

### LEADING_HYPHEN

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error LEADING_HYPHEN
```

A label starts with a hyphen-minus ('-').

<br />

### PUNYCODE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### TRAILING_HYPHEN

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final IDNA.Error TRAILING_HYPHEN
```

A label ends with a hyphen-minus ('-').

<br />

## Public methods

### valueOf

```
public static IDNA.Error valueOf (String name)
```

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | <br /> |

### values

```
public static final Error[] values ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/IDNA.Error` | <br /> |