adavid.util
Class ByteVector

java.lang.Object
  |
  +--adavid.util.ByteVector

public class ByteVector
extends java.lang.Object


Field Summary
static int DEFAULT_INC_SIZE
          controls the increment size when a new array has to be allocated.
 
Constructor Summary
ByteVector()
          default constructor
ByteVector(int inc_size)
          contructor: change the default increment size
 
Method Summary
 void add(byte b)
          add a byte
 byte byteAt(int i)
          returns the byte element at index i
 int length()
          returns the size of the vector
 byte[] toArray()
          returns an array representation of the byte vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INC_SIZE

public static final int DEFAULT_INC_SIZE
controls the increment size when a new array has to be allocated.
Constructor Detail

ByteVector

public ByteVector(int inc_size)
contructor: change the default increment size

ByteVector

public ByteVector()
default constructor
Method Detail

add

public void add(byte b)
add a byte

length

public int length()
returns the size of the vector

byteAt

public byte byteAt(int i)
returns the byte element at index i

toArray

public byte[] toArray()
returns an array representation of the byte vector