Class DataReader
Hierarchy
- DataReader
Index
Constructors
Properties
Methods
Constructors
constructor
-
Constructor
Parameters
-
buffer: IDataBuffer
The buffer to read
Returns DataReader
-
Properties
Readonly bufferSearch playground for buffer
The data buffer associated with this data reader.
byte OffsetSearch playground for byteOffset
The current byte offset from the beginning of the data buffer.
Methods
load AsyncSearch playground for loadAsync
-
Loads the given byte length.
Parameters
-
byteLength: number
The byte length to load
Returns Promise<void>
A promise that resolves when the load is complete
-
read StringSearch playground for readString
-
Read a string from the currently loaded data range.
Parameters
-
byteLength: number
The byte length to read
Returns string
The string read
-
read Uint32Search playground for readUint32
-
Read a unsigned 32-bit integer from the currently loaded data range.
Returns number
The 32-bit integer read
read Uint8 ArraySearch playground for readUint8Array
-
Read a byte array from the currently loaded data range.
Parameters
-
byteLength: number
The byte length to read
Returns Uint8Array
The byte array read
-
skip BytesSearch playground for skipBytes
-
Skips the given byte length the currently loaded data range.
Parameters
-
byteLength: number
The byte length to skip
Returns void
-
Utility class for reading from a data buffer