class CharsetTranscoder
source · line 12public class CharsetTranscoder public constructor(
/**
* The encoding of bytes read from the input buffer.
*/
public val source: Charset,
/**
* The encoding of bytes appended to the output buffer.
*/
public val destination: Charset,
options: CharsetTranscodeOptions = CharsetTranscodeOptions()
) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
A stateful native converter between two encodings. Close it after use, including after a conversion failure.
Calls must not overlap. Once final input is accepted, no further nonempty input may be supplied; continue draining output until CharsetState.Finished.
function process
source · line 38public fun process(input: NativeByteBuffer, output: NativeByteBuffer, endInput: Boolean = false): CharsetStep
Converts readable input into writable output and advances both buffers by the returned byte
counts. Set endInput for the final input; repeat calls as requested by CharsetStep.state
until finished.
parameter output
source · line 38output: NativeByteBuffer
parameter input
source · line 38input: NativeByteBuffer
parameter endInput
source · line 38endInput: Boolean = false
property source
source · line 16public val source: Charset
get: public read-only
The encoding of bytes read from the input buffer.
property destination
source · line 20public val destination: Charset
get: public read-only
The encoding of bytes appended to the output buffer.
function close
source · line 70public override fun close(): Unit
- Overrides
close
Releases the native conversion state. Repeated closes are allowed, but a close must not overlap a conversion call.
constructor constructor
source · line 12constructor(public val source: Charset, public val destination: Charset, options: CharsetTranscodeOptions = CharsetTranscodeOptions())
parameter destination
source · line 20public val destination: Charset
parameter options
source · line 21options: CharsetTranscodeOptions = CharsetTranscodeOptions()
parameter source
source · line 16public val source: Charset