fipaos.parser.acl.util
Class ByteArray


public class ByteArray

Dynamic byte array.


Constructor Summary
ByteArray()
          Initializes the ByteArray with size 100
ByteArray(int init_size)
          Initialized the ByteArray with given size

Method Summary
 ByteArrayadd(byte b)
          Add a byte to this array.
 ByteArrayadd(byte[] b, int len)
          Add a array of bytes to this array
 ByteArrayadd(ByteArray b)
          Add a ByteArray to this array
 ByteArrayaddToPos(byte b, int pos)
          Add a byte to this array is specified position.
 byte[]get()
          Returns this array
 intlength()
          Returns the lenght of this array
 voidreset()
          Clear this array

Constructor Detail

ByteArray

public ByteArray()
Initializes the ByteArray with size 100

ByteArray

public ByteArray(int init_size)
Initialized the ByteArray with given size
Parameters:
init_size - Initial size for the array.
Method Detail

add

public ByteArray add(byte b)
Add a byte to this array.
Parameters:
b - byte to add

add

public ByteArray add(byte[] b, int len)
Add a array of bytes to this array
Parameters:
b - Byte array to add
len - Lenght of byte array to add.

add

public ByteArray add(ByteArray b)
Add a ByteArray to this array
Parameters:
b - ByteArray to add

addToPos

public ByteArray addToPos(byte b, int pos)
Add a byte to this array is specified position.
Parameters:
b - byte to add
pos - position

get

public byte[] get()
Returns this array

length

public int length()
Returns the lenght of this array

reset

public void reset()
Clear this array