Skip to main content

ReadableStreamBYOBRequest

The ReadableStreamBYOBRequest interface of the Streams API represents a "pull request" for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).

MDN Reference

Methods

respond()

respond(bytesWritten): void;

The respond() method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.

MDN Reference

Parameters

ParameterType
bytesWrittennumber

Returns

void


respondWithNewView()

respondWithNewView(view): void;

The respondWithNewView() method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.

MDN Reference

Parameters

ParameterType
viewArrayBufferView<ArrayBuffer>

Returns

void

Properties

view

readonly view: ArrayBufferView<ArrayBuffer> | null;

The view getter property of the ReadableStreamBYOBRequest interface returns the current view.

MDN Reference