public class ByteArray
extends java.lang.Object
| Constructor and Description |
|---|
ByteArray()
Dynamic byte array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte b)
Appends a byte to this array.
|
byte |
byteAt(int index)
Returns the byte at the given position.
|
byte[] |
getBytes()
Get the byte array from this object.
|
int |
size()
The size of this byte array.
|
java.lang.String |
toString() |
void |
trunc()
Truncate the byte array to the correct size.
|
public void append(byte b)
b - the byte to append.public int size()
public byte byteAt(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - the position.java.lang.ArrayIndexOutOfBoundsExceptionpublic void trunc()
public byte[] getBytes()
public java.lang.String toString()
toString in class java.lang.Object