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.