Stay organized with collections
Save and categorize content based on your preferences.
CodingErrorAction
open class CodingErrorAction
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
Public methods |
open String |
Returns a string describing this action.
|
Properties |
static CodingErrorAction! |
Action indicating that a coding error is to be handled by dropping the erroneous input and resuming the coding operation.
|
static CodingErrorAction! |
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.
|
static CodingErrorAction! |
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
open fun toString(): String
Returns a string describing this action.
Return |
String |
A descriptive string |
Properties
IGNORE
static val IGNORE: CodingErrorAction!
Action indicating that a coding error is to be handled by dropping the erroneous input and resuming the coding operation.
REPLACE
static val REPLACE: CodingErrorAction!
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# CodingErrorAction\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCodingErrorAction\n=================\n\n```\nopen class CodingErrorAction\n```\n\n|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.nio.charset.CodingErrorAction](#) |\n\nA typesafe enumeration for coding-error actions.\n\nInstances of this class are used to specify how malformed-input and unmappable-character errors are to be handled by charset [decoders](/reference/kotlin/java/nio/charset/CharsetDecoder#cae) and [encoders](/reference/kotlin/java/nio/charset/CharsetEncoder#cae).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` Returns a string describing this action. |\n\n| Properties ||\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [CodingErrorAction](#)! | [IGNORE](#IGNORE:java.nio.charset.CodingErrorAction) Action indicating that a coding error is to be handled by dropping the erroneous input and resuming the coding operation. |\n| static [CodingErrorAction](#)! | [REPLACE](#REPLACE:java.nio.charset.CodingErrorAction) 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| static [CodingErrorAction](#)! | [REPORT](#REPORT:java.nio.charset.CodingErrorAction) Action indicating that a coding error is to be reported, either by returning a [CoderResult](/reference/kotlin/java/nio/charset/CoderResult) object or by throwing a [CharacterCodingException](/reference/kotlin/java/nio/charset/CharacterCodingException), whichever is appropriate for the method implementing the coding process. |\n\nPublic methods\n--------------\n\n### toString\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\nReturns a string describing this action.\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | A descriptive string |\n\nProperties\n----------\n\n### IGNORE\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val IGNORE: CodingErrorAction!\n```\n\nAction indicating that a coding error is to be handled by dropping the erroneous input and resuming the coding operation. \n\n### REPLACE\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val REPLACE: CodingErrorAction!\n```\n\nAction 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\n### REPORT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val REPORT: CodingErrorAction!\n```\n\nAction indicating that a coding error is to be reported, either by returning a [CoderResult](/reference/kotlin/java/nio/charset/CoderResult) object or by throwing a [CharacterCodingException](/reference/kotlin/java/nio/charset/CharacterCodingException), whichever is appropriate for the method implementing the coding process."]]