WARNING: if the buffer grows, the view had changed itself,
and the reference will be a invalid one.
Returns Uint8Array
bufferLength
bufferLength(): number
Returns
The capacity of the current buffer
Returns number
currentReadOffset
currentReadOffset(): number
Returns
The current read offset
Returns number
currentWriteOffset
currentWriteOffset(): number
Returns
The current write offset
Returns number
getFloat32
getFloat32(offset: number): number
Parameters
offset: number
Returns number
getFloat64
getFloat64(offset: number): number
Parameters
offset: number
Returns number
getInt16
getInt16(offset: number): number
Parameters
offset: number
Returns number
getInt32
getInt32(offset: number): number
Parameters
offset: number
Returns number
getInt64
getInt64(offset: number): bigint
Parameters
offset: number
Returns bigint
getInt8
getInt8(offset: number): number
Parameters
offset: number
Returns number
getUint16
getUint16(offset: number): number
Parameters
offset: number
Returns number
getUint32
getUint32(offset: number): number
Parameters
offset: number
Returns number
getUint64
getUint64(offset: number): bigint
Parameters
offset: number
Returns bigint
getUint8
getUint8(offset: number): number
Parameters
offset: number
Returns number
incrementReadOffset
incrementReadOffset(amount: number): number
Reading purpose
Returns the previuos offsset size before incrementing
Parameters
amount: number
Returns number
incrementWriteOffset
incrementWriteOffset(amount: number): number
Increment offset
Returns
The offset when this reserving starts.
Parameters
amount: number
how many bytes
Returns number
readBuffer
readBuffer(): Uint8Array
Returns Uint8Array
readFloat32
readFloat32(): number
Returns number
readFloat64
readFloat64(): number
Returns number
readInt16
readInt16(): number
Returns number
readInt32
readInt32(): number
Returns number
readInt64
readInt64(): bigint
Returns bigint
readInt8
readInt8(): number
Returns number
readUint16
readUint16(): number
Returns number
readUint32
readUint32(): number
Returns number
readUint64
readUint64(): bigint
Returns bigint
readUint8
readUint8(): number
Returns number
readUtf8String
readUtf8String(): string
Returns string
remainingBytes
remainingBytes(): number
Returns
How many bytes are available to read.
Returns number
resetBuffer
resetBuffer(): void
Resets byteBuffer to avoid creating a new one
Returns void
setFloat32
setFloat32(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setFloat64
setFloat64(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setInt16
setInt16(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setInt32
setInt32(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setInt64
setInt64(offset: number, value: bigint): void
Parameters
offset: number
value: bigint
Returns void
setInt8
setInt8(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setUint16
setUint16(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setUint32
setUint32(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
setUint64
setUint64(offset: number, value: bigint): void
Parameters
offset: number
value: bigint
Returns void
setUint8
setUint8(offset: number, value: number): void
Parameters
offset: number
value: number
Returns void
toBinary
toBinary(): Uint8Array
Take care using this function, if you modify the data after, the
returned subarray will change too. If you'll modify the content of the
bytebuffer, maybe you want to use toCopiedBinary()
Returns
The subarray from 0 to offset as reference.
Returns Uint8Array
toCopiedBinary
toCopiedBinary(): Uint8Array
Safe copied buffer of the current data of ByteBuffer
Returns
The entire current Uint8Array.
WARNING: if the buffer grows, the view had changed itself, and the reference will be a invalid one.