fipaos.parser.acl.util
Class ByteArray

java.lang.Object
  |
  +--fipaos.parser.acl.util.ByteArray

public class ByteArray
extends java.lang.Object

Dynamic byte array.


Constructor Summary
ByteArray()
          Initializes the ByteArray with size 100
ByteArray(int init_size)
          Initialized the ByteArray with given size
 
Method Summary
 ByteArray add(byte b)
          Add a byte to this array.
 ByteArray add(byte[] b, int len)
          Add a array of bytes to this array
 ByteArray add(ByteArray b)
          Add a ByteArray to this array
 ByteArray addToPos(byte b, int pos)
          Add a byte to this array is specified position.
 byte[] get()
          Returns this array
 int length()
          Returns the lenght of this array
 void reset()
          Clear this array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

reset

public void reset()
Clear this array

length

public int length()
Returns the lenght of this array

get

public byte[] get()
Returns this array

add

public ByteArray add(byte b)
Add a byte to this array.
Parameters:
b - byte 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

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