Decoder

Constructors

Link copied to clipboard
constructor(cs: Charset)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the average number of characters that will be produced for each byte of input. This heuristic value may be used to estimate the size of the output buffer required for a given input sequence.

Link copied to clipboard

Returns the charset that created this decoder.

Link copied to clipboard

Convenience method that decodes the remaining content of a single input byte buffer into a newly-allocated character buffer.

fun decode(in: ByteBuffer, out: CharBuffer, endOfInput: Boolean): CoderResult

Decodes as many bytes as possible from the given input buffer, writing the results to the given output buffer.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Retrieves the charset that was detected by this decoder  (optional operation).

Link copied to clipboard

Flushes this decoder.

Link copied to clipboard

Returns this decoder's current action for malformed-input errors.

Link copied to clipboard

Returns the maximum number of characters that will be produced for each byte of input. This value may be used to compute the worst-case size of the output buffer required for a given input sequence. This value accounts for any necessary content-independent prefix or suffix

Link copied to clipboard

Changes this decoder's action for malformed-input errors.

Link copied to clipboard

Changes this decoder's action for unmappable-character errors.

Link copied to clipboard

Returns this decoder's replacement value.

Link copied to clipboard
fun replaceWith(newReplacement: String): CharsetDecoder

Changes this decoder's replacement value.

Link copied to clipboard

Resets this decoder, clearing any internal state.

Link copied to clipboard

Returns this decoder's current action for unmappable-character errors.