TextDecoder

Implements a JavaScript TextDecoderAPI.

Constructors

Link copied to clipboard
constructor(label: String, options: TextDecoder.Options)

Public host-side encoding label constructor.

constructor(label: String)

Public host-side encoding label constructor.

constructor(encoding: JsEncoding)

Public host-side encoding constructor.

constructor()

Public no-arg constructor.

Types

Link copied to clipboard

Shortcut methods for creating TextDecoderAPI.DecodeOptions instances.

Link copied to clipboard

Constructors for TextDecoder instances.

Link copied to clipboard
object Options

Shortcut methods for creating TextDecoderAPI.Options instances.

Properties

Link copied to clipboard
open override val encoding: String

Specifies the encoding implemented by this utility instance.

Link copied to clipboard
open override val options: TextDecoder.Options

Provides host-side access to TextDecoder options.

Functions

Link copied to clipboard
open override fun decode(stream: InputStream): String

Decodes an input stream of bytes into a string.

open override fun decode(buffer: ByteBuffer): String

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

open override fun decode(channel: ReadableByteChannel): String

Consumes and decodes an input channel into a string.

open override fun decode(bytes: ByteArray): String

Decodes a byte array into a string.

open override fun decode(buffer: ByteBuffer, options: TextDecoder.DecodeOptions?): String

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

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

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

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

Decodes a byte stream into a string.

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

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

Link copied to clipboard
open override fun getMember(key: String?): Any?
Link copied to clipboard
open override fun getMemberKeys(): Array<String>
Link copied to clipboard
open override fun hasMember(key: String?): Boolean
Link copied to clipboard
open override fun putMember(key: String?, value: Value?)
Link copied to clipboard
open override fun removeMember(key: String?): Boolean