decode

open fun decode(): String

Decode

Decodes a byte stream into a string.


abstract fun decode(bytes: ByteArray): String

Decode (Host)

Decodes a byte array into a string.

Return

The decoded string.

Parameters

bytes

The byte array to decode.


abstract fun decode(stream: InputStream): String

Decode (Host Streams)

Decodes an input stream of bytes into a string.

Return

The decoded string.

Parameters

stream

The stream to decode.


abstract fun decode(channel: ReadableByteChannel): String

Decode (Host Channels)

Consumes and decodes an input channel into a string.

Return

The decoded string.

Parameters

channel

The channel to consume.


abstract fun decode(buffer: ByteBuffer): String

Decode (Host Buffer)

Consumes and decodes an input buffer of bytes to a string.

Return

The decoded string.

Parameters

buffer

The buffer to consume.


open fun decode(buffer: Value?): String

Decode

Decodes a byte stream into a string.

Return

The decoded string.

Parameters

buffer

The buffer to decode.


open fun decode(buffer: Value?, options: Value?): String

Decode with Options

Decodes a byte stream into a string, potentially with options.

Parameters

buffer

The buffer to decode.

options

The options to use when decoding.


abstract fun decode(buffer: Value, options: TextDecoder.DecodeOptions): String

Decode with Options

Decodes a byte stream into a string, potentially with options; this method is for host-side dispatch only.

Parameters

buffer

The buffer to decode.

options

The options to use when decoding.


abstract fun decode(buffer: ByteBuffer, options: TextDecoder.DecodeOptions? = null): String

Host Decode

Decodes a ByteBuffer using the provided options and this text decoder's assigned encoding.

Parameters

buffer

The buffer to decode.

options

The options to use when decoding.