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).
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.
Parameters
| Parameter | Type |
|---|---|
bytesWritten | number |
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.
Parameters
| Parameter | Type |
|---|---|
view | ArrayBufferView<ArrayBuffer> |
Returns
void
Properties
view
readonly view: ArrayBufferView<ArrayBuffer> | null;
The view getter property of the ReadableStreamBYOBRequest interface returns the current view.