v2026.5.3
All Bundles
Bundle Core runtime library providing primitive types (Bool, Byte, Char, Int, Float, String), base collections, and system utilities. Every Objeck program links against this bundle automatically via lang.obl.

ByteBuffer

Byte array buffer

Implements: Compare, Clone

Operations

Append # native

Appends a byte array

method : public : native : Append(array:Byte[]) ~ Nil

Parameters

NameTypeDescription
arrayBytearray to be copied

Append # native

Appends a byte array

method : public : native : Append(length:Int, array:Byte[]) ~ Nil

Parameters

NameTypeDescription
lengthIntnumber of characters to copy
arrayBytearray to be copied

Append #

Appends a byte

method : public : Append(c:Byte) ~ Nil

Parameters

NameTypeDescription
cBytebyte to append

Capacity #

Gets the current buffer's storage capacity. That is the number of bytes the buffer will hold before it is resized for growth.

method : public : Capacity() ~ Int

Return

TypeDescription
Intbuffer capacity

Clone #

Clones the object instance

method : public : Clone() ~ System.ByteBuffer

Return

TypeDescription
ByteBuffercloned the object instance

Compare #

Compares two objects

method : public : Compare(rhs:System.Compare) ~ Int

Parameters

NameTypeDescription
rhsComparecompare object

Return

TypeDescription
Int0 if equal, -1 if right-hand side i greater, 1 if left-hand side is greater

Get # native

Returns the byte at the given index

method : public : native : Get(index:Int) ~ Char

Parameters

NameTypeDescription
indexIntindex offset

Return

TypeDescription
Charbyte at index

HashID # native

Returns a unique hash ID for a given byte sequence

method : public : native : HashID() ~ Int

Return

TypeDescription
Inthash ID

New # constructor

Copy constructor

New(buffer:Byte[])

Parameters

NameTypeDescription
bufferBytebuffer to set

New # constructor

Default constructor

New()

Raw #

Gets the raw reference to the underlying byte array

method : public : Raw() ~ Byte[]

Return

TypeDescription
Byteraw byte array reference

Size #

Return the size of the string

method : public : Size() ~ Int

Return

TypeDescription
Intsize of the string

ToByteArray #

Returns a trimmed byte array

method : public : ToByteArray() ~ Byte[]

Return

TypeDescription
Bytebyte array

ToString #

Returns a string representation of the byte buffer

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation of the byte buffer