id: tbytebuffer title: TByteBuffer
A TBuffer for bytes.
Method Order:EByteOrder()Gets the byte order used by the TByteBuffer when doing Byte conversions.
Method Order:TByteBuffer(byteOrder:EByteOrder)Sets the byte order to use by the TByteBuffer when doing Byte conversions.
Method Get:Byte() AbstractReturns the Byte at the current position, and increments the position by 1.
Method GetShort:Short() AbstractReturns the Short at the current position, and increments the position by 2.
Method GetInt:Int() AbstractReturns the Int at the current position, and increments the position by 4.
Method GetUInt:UInt() AbstractReturns the UInt at the current position, and increments the position by 4.
Method GetLong:Long() AbstractReturns the Long at the current position, and increments the position by 8.
Method GetULong:ULong() AbstractReturns the ULong at the current position, and increments the position by 8.
Method GetSizeT:Size_T() AbstractReturns the Size_T at the current position, and increments the position by 8 (64-bit) or 4 (32-bit).
Method GetFloat:Float() AbstractReturns the Float at the current position, and increments the position by 4.
Method GetDouble:Double() AbstractReturns the Double at the current position, and increments the position by 8.
Method GetBytes(dst:Byte Ptr, length:UInt) AbstractCopies length bytes into dst at the curent position, and increments the position by length.
Method Put:TByteBuffer(value:Byte) AbstractWrites the specified Byte to the current position and increments the position by 1.
Method PutShort:TByteBuffer(value:Short) AbstractWrites the specified Short to the current position and increments the position by 2.
Method PutInt:TByteBuffer(value:Int) AbstractWrites the specified Int to the current position and increments the position by 4.
Method PutUInt:TByteBuffer(value:UInt) AbstractWrites the specified UInt to the current position and increments the position by 4.
Method PutLong:TByteBuffer(value:Long) AbstractWrites the specified Long to the current position and increments the position by 8.
Method PutULong:TByteBuffer(value:ULong) AbstractWrites the specified ULong to the current position and increments the position by 8.
Method PutSizeT:TByteBuffer(value:Size_T) AbstractWrites the specified Size_T to the current position and increments the position by 8 (64-bit) or 4 (32-bit).
Method PutFloat:TByteBuffer(value:Float) AbstractWrites the specified Float to the current position and increments the position by 4.
Method PutDouble:TByteBuffer(value:Double) AbstractWrites the specified Double to the current position and increments the position by 8.
Method PutBytes:TByteBuffer(bytes:Byte Ptr, length:UInt) AbstractWrites the specified number of bytes to the current position.
Method Slice:TByteBuffer() AbstractReturns a sliced TByteBuffer that shares its content with this one.
The new buffer's position, limit, and mark are independent of this buffer.
Method Slice:TByteBuffer(length:Int) AbstractReturns a sliced TByteBuffer that shares its content with this one.
The new buffer's position, limit, and mark are independent of this buffer.
Method Slice:TByteBuffer(start:Int, length:Int) AbstractReturns a sliced TByteBuffer that shares its content with this one, starting at the specified start position.
The new buffer's position, limit, and mark are independent of this buffer.
Method SliceFrom:TByteBuffer(start:Int) AbstractReturns a sliced TByteBuffer that shares its content with this one, starting at the specified start position.
The new buffer's position, limit, and mark are independent of this buffer.
Method Duplicate:TByteBuffer() AbstractCreates a duplicate TByteBuffer that shares its content with this one.
Method Compact:TByteBuffer() AbstractCompacts this TByteBuffer.
Method AsReadOnly:TByteBuffer() AbstractReturns a read-only view of this buffer.
The returned buffer shares content with this buffer but does not allow modification. The position, limit, mark, and byte order are preserved.
Function Allocate:TByteBuffer(size:Int)Allocates a new TByteBuffer of the specific size number of bytes.
Function Wrap:TByteBuffer(data:Byte[])Creates a new TByteBuffer by wrapping the provided Byte array.
Function Wrap:TByteBuffer(data:Byte Ptr, size:Int)Creates a new TByteBuffer by wrapping the provided Byte Ptr.
Note that the Byte Ptr is expected to remain valid throughout the use of the TByteBuffer. Freeing the associated memory early may result in undefined behaviour.