ReadableStreamBYOBReader

The ReadableStreamBYOBReader interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.

MDN Reference

Constructors

Link copied to clipboard
constructor(stream: ReadableStream<Uint8Array<ArrayBuffer>>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun cancel(reason: JsError? = definedExternally)
Link copied to clipboard
open fun cancelAsync(reason: JsError? = definedExternally): Promise<Void>
Link copied to clipboard
suspend fun <T : ArrayBufferView<*>> read(view: T): ReadableStreamReadResult<T>

The read() method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.

Link copied to clipboard
Link copied to clipboard

The releaseLock() method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.