ByteBuffer
Byte array buffer
Operations
Append
Appends a byte array
method : public : native : Append(array:Byte[]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
array | Byte | array to be copied |
Append
Appends a byte array
method : public : native : Append(length:Int, array:Byte[]) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
length | Int | number of characters to copy |
array | Byte | array to be copied |
Append
Appends a byte
method : public : Append(c:Byte) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
c | Byte | byte 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
Type | Description |
---|---|
Int | buffer capacity |
Clone
Clones the object instance
method : public : Clone() ~ System.ByteBuffer
Return
Type | Description |
---|---|
ByteBuffer | cloned the object instance |
Compare
Compares two objects
method : public : Compare(rhs:System.Compare) ~ Int
Parameters
Name | Type | Description |
---|---|---|
rhs | Compare | compare object |
Return
Type | Description |
---|---|
Int | 0 if equal, -1 if right-hand side i greater, 1 if left-hand side is greater |
Get
Returns the byte at the given index
method : public : native : Get(index:Int) ~ Char
Parameters
Name | Type | Description |
---|---|---|
index | Int | index offset |
Return
Type | Description |
---|---|
Char | byte at index |
HashID
Returns a unique hash ID for a given byte sequence
method : public : native : HashID() ~ Int
Return
Type | Description |
---|---|
Int | hash ID |
Raw
Gets the raw reference to the underlying byte array
method : public : Raw() ~ Byte[]
Return
Type | Description |
---|---|
Byte | raw byte array reference |
Size
Return the size of the string
method : public : Size() ~ Int
Return
Type | Description |
---|---|
Int | size of the string |
ToByteArray
Returns a trimmed byte array
method : public : ToByteArray() ~ Byte[]
Return
Type | Description |
---|---|
Byte | byte array |
ToString
Returns a string representation of the byte buffer
method : public : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation of the byte buffer |