Stay organized with collections
Save and categorize content based on your preferences.
CodingErrorAction
public
class
CodingErrorAction
extends Object
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 and encoders.
Summary
Fields |
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.
|
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.
|
public
static
final
CodingErrorAction |
REPORT
Action indicating that a coding error is to be reported, either by
returning a CoderResult object or by throwing a CharacterCodingException , whichever is appropriate for the method
implementing the coding process.
|
Public methods |
String
|
toString()
Returns a string describing this action.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(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
|
wait(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
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Fields
IGNORE
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.
REPLACE
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.
REPORT
public static final CodingErrorAction REPORT
Action indicating that a coding error is to be reported, either by
returning a CoderResult
object or by throwing a CharacterCodingException
, whichever is appropriate for the method
implementing the coding process.
Public methods
toString
public String toString ()
Returns a string describing this action.
Returns |
String |
A descriptive string |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# CodingErrorAction\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Fields](#lfields) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nCodingErrorAction\n=================\n\n\n`\npublic\n\n\nclass\nCodingErrorAction\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | java.nio.charset.CodingErrorAction |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA typesafe enumeration for coding-error actions.\n\nInstances of this class are used to specify how malformed-input and\nunmappable-character errors are to be handled by charset [decoders](/reference/java/nio/charset/CharsetDecoder#cae) and [encoders](/reference/java/nio/charset/CharsetEncoder#cae).\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Fields ||\n|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final `[CodingErrorAction](/reference/java/nio/charset/CodingErrorAction) | [IGNORE](/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. |\n| ` public static final `[CodingErrorAction](/reference/java/nio/charset/CodingErrorAction) | [REPLACE](/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. |\n| ` public static final `[CodingErrorAction](/reference/java/nio/charset/CodingErrorAction) | [REPORT](/reference/java/nio/charset/CodingErrorAction#REPORT) Action indicating that a coding error is to be reported, either by returning a [CoderResult](/reference/java/nio/charset/CoderResult) object or by throwing a [CharacterCodingException](/reference/java/nio/charset/CharacterCodingException), whichever is appropriate for the method implementing the coding process. |\n\n| ### Public methods ||\n|------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/nio/charset/CodingErrorAction#toString())`() ` Returns a string describing this action. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/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 `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/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` | ` `[wait](/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` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nFields\n------\n\n### IGNORE\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final CodingErrorAction IGNORE\n```\n\nAction indicating that a coding error is to be handled by dropping the\nerroneous input and resuming the coding operation.\n\n\u003cbr /\u003e\n\n### REPLACE\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final CodingErrorAction REPLACE\n```\n\nAction indicating that a coding error is to be handled by dropping the\nerroneous input, appending the coder's replacement value to the output\nbuffer, and resuming the coding operation.\n\n\u003cbr /\u003e\n\n### REPORT\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final CodingErrorAction REPORT\n```\n\nAction indicating that a coding error is to be reported, either by\nreturning a [CoderResult](/reference/java/nio/charset/CoderResult) object or by throwing a [CharacterCodingException](/reference/java/nio/charset/CharacterCodingException), whichever is appropriate for the method\nimplementing the coding process.\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### toString\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String toString ()\n```\n\nReturns a string describing this action.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------|-----------------------------|\n| [String](/reference/java/lang/String) | A descriptive string \u003cbr /\u003e |"]]