alphaTab.io.IReadable
Represents a stream of binary data that can be read from.
interface IReadableProperties​
length​
Gets the total number of bytes contained in the stream.
- JavaScript
- C#
- Kotlin
readonly length: number;double Length { get; }val length: Doubleposition​
Gets or sets the current read position relative in the stream.
- JavaScript
- C#
- Kotlin
position: number;double Position { get; set; }var position: DoubleMethods​
read​
Reads the given number of bytes from the stream into the given buffer.
- JavaScript
- C#
- Kotlin
read(buffer: Uint8Array, offset: number, count: number): numberdouble Read(Uint8Array buffer, double offset, double count)fun read(buffer: Uint8Array, offset: Double, count: Double): Double| Parameter | Summary |
|---|---|
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.
- JavaScript
- C#
- Kotlin
readAll(): Uint8ArrayUint8Array ReadAll()fun readAll(): Uint8ArrayreadByte​
Read a single byte from the data stream.
- JavaScript
- C#
- Kotlin
readByte(): numberdouble ReadByte()fun readByte(): DoubleReturns​
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.
- JavaScript
- C#
- Kotlin
reset(): voidvoid Reset()fun reset(): Unitskip​
Skip the given number of bytes.
- JavaScript
- C#
- Kotlin
skip(offset: number): voidvoid Skip(double offset)fun skip(offset: Double): Unit| Parameter | Summary |
|---|---|
offsetAll | The number of bytes to skip. |