decode

open override 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 override 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.


open override 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.


open override 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.


open override fun decode(buffer: ByteBuffer, options: TextDecoder.DecodeOptions?): 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.


open override 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.