Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Fields](https://developer.android.com/reference/java/nio/charset/CodingErrorAction#lfields) \| [Methods](https://developer.android.com/reference/java/nio/charset/CodingErrorAction#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/nio/charset/CodingErrorAction#inhmethods)

# CodingErrorAction


`
public


class
CodingErrorAction
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.nio.charset.CodingErrorAction |

<br />

*** ** * ** ***

A typesafe enumeration for coding-error actions.

Instances of this class are used to specify how malformed-input and
unmappable-character errors are to be handled by charset [decoders](https://developer.android.com/reference/java/nio/charset/CharsetDecoder#cae) and [encoders](https://developer.android.com/reference/java/nio/charset/CharsetEncoder#cae).

<br />

## Summary

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/java/nio/charset/CodingErrorAction` | `https://developer.android.com/reference/java/nio/charset/CodingErrorAction#IGNORE` Action indicating that a coding error is to be handled by dropping the erroneous input and resuming the coding operation. |
| ` public static final https://developer.android.com/reference/java/nio/charset/CodingErrorAction` | `https://developer.android.com/reference/java/nio/charset/CodingErrorAction#REPLACE` Action indicating that a coding error is to be handled by dropping the erroneous input, appending the coder's replacement value to the output buffer, and resuming the coding operation. |
| ` public static final https://developer.android.com/reference/java/nio/charset/CodingErrorAction` | `https://developer.android.com/reference/java/nio/charset/CodingErrorAction#REPORT` Action indicating that a coding error is to be reported, either by returning a `https://developer.android.com/reference/java/nio/charset/CoderResult` object or by throwing a `https://developer.android.com/reference/java/nio/charset/CharacterCodingException`, whichever is appropriate for the method implementing the coding process. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/nio/charset/CodingErrorAction#toString()() ` Returns a string describing this action. |

| ### Inherited methods |
|---|---|
| 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*. | ||

## Fields

### IGNORE

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

```
public static final CodingErrorAction IGNORE
```

Action indicating that a coding error is to be handled by dropping the
erroneous input and resuming the coding operation.

<br />

### REPLACE

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

```
public static final CodingErrorAction REPLACE
```

Action indicating that a coding error is to be handled by dropping the
erroneous input, appending the coder's replacement value to the output
buffer, and resuming the coding operation.

<br />

### REPORT

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

```
public static final CodingErrorAction REPORT
```

Action indicating that a coding error is to be reported, either by
returning a `https://developer.android.com/reference/java/nio/charset/CoderResult` object or by throwing a `https://developer.android.com/reference/java/nio/charset/CharacterCodingException`, whichever is appropriate for the method
implementing the coding process.

<br />

## Public methods

### toString

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

```
public String toString ()
```

Returns a string describing this action.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A descriptive string <br /> |