Create a stream over a window of a random-access reader.
The synchronous source to read from.
Byte offset in reader where this stream begins.
Optionallength: number
Length of the window in bytes; defaults to the remainder of
the reader from start.
Size of the read-ahead cache in bytes.
Whether the stream supports reading.
Whether the stream supports writing.
Whether the stream supports seeking.
The length of the stream, in bytes.
The current position within the stream.
Set the current position within the stream.
Read bytes from the stream.
The buffer to read data into.
The offset into the buffer to start reading data.
The number of bytes to read.
The total number of bytes read into the buffer, or zero if the end of the stream has been reached.
Write bytes to the stream. Not supported.
Set the position within the stream.
The offset relative to origin.
The reference point used to obtain the new position.
The new position within the stream.
Flush the stream. A no-op for read-only streams.
Set the length of the stream. Not supported.
Copy data from this stream to another stream.
The stream that will receive the copied data.
The temporary buffer size to use while copying.
Release resources. Base implementation does nothing.
Protected StaticvalidateValidate buffer, offset, and count arguments for stream read/write operations.
The buffer supplied by the caller.
The starting offset in the buffer.
The number of bytes to read or write.
Protectedthrow
A read-only, seekable stream over a SyncRandomAccessReader, backed by a fixed-size chunk cache.