Static ReadonlySIZEReadonlylockedThe locked read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.
Current number of bytes queued but unread.
Current default endianness. May be changed in the middle of the stream for formats like pcapng.
Current read position in bytes from the original start of the stream.
The abort() method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
Optionalreason: anyWait for an ASCII string of a given size (in bytes) to be available in the stream. Decoding turns each byte into a single JS character directly, which may not be exactly what you want for characters over 127.
Number of bytes to read.
Promise that is rejected if stream is closed without enough data.
Fully read a number of bytes from the stream.
Number of bytes.
Promise that is rejected if stream is closed without enough data.
The close() method of the WritableStream interface closes the associated stream.
Wait for a short float to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for a float to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for a double to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
The getWriter() method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
Wait for an signed short integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an signed integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an signed long integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an signed byte to be available in the stream.
Promise that is rejected if stream is closed without enough data.
Peek at some bytes at the front of the queue. This will cut the buffers in the queue up, so it's likely to be slightly less performant than reading chunks of the correct size, unless you're going to read this exact size again next.
Number of bytes to peek at.
Promise fulfilled with array of the expected size.
Wait for an entire packet structure at once. Only useful for relatively- simplistic structures. If all of the fields have known size, the length is not required.
Field descriptions, in the order you want them read.
Optionallength: numberNumber of bytes, if needed.
This, for chaining.
Wait for an unsigned short integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an unsigned integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an unsigned long integer to be available in the stream.
Override th endianness of the stream for a single read.
Promise that is rejected if stream is closed without enough data.
Wait for an unsigned byte to be available in the stream.
Promise that is rejected if stream is closed without enough data.
Wait for a UTF8-encoded string of a given size (in bytes) to be available in the stream.
Number of bytes to read.
Promise that is rejected if stream is closed without enough data.
Wait for a number of bytes to be available to read immediately from the stream.
Number of bytes.
Promise that is rejected if stream is closed without enough data.
This is readable in the DataView sense, but writable in the stream sense.