Skip to main content

alphaTab.io.IReadable

Represents a stream of binary data that can be read from.

 interface IReadable

Properties​

length​

Gets the total number of bytes contained in the stream.

readonly length: number;

position​

Gets or sets the current read position relative in the stream.

position: number;

Methods​

read​

Reads the given number of bytes from the stream into the given buffer.

read(buffer: Uint8Array, offset: number, count: number): number
ParameterSummary
bufferAll

The buffer to fill.

offsetAll

The offset in the buffer where to start writing.

countAll

The number of bytes to read.

readAll​

Reads the remaining data.

readAll(): Uint8Array

readByte​

Read a single byte from the data stream.

readByte(): number

Returns​

The value of the next byte or -1 if there is no more data.

reset​

Resets the stream for reading the data from the beginning.

reset(): void

skip​

Skip the given number of bytes.

skip(offset: number): void
ParameterSummary
offsetAll

The number of bytes to skip.