concast.base
Class ConcastPacket

java.lang.Object
  |
  +--concast.base.ConcastPacket

public class ConcastPacket
extends java.lang.Object

Storage for the concast date packet This is "write once, read many" object. User can only write once when packet is created. It is implemented this way, to give user incoming packet as "readonly". Note : it's not really readonly, since user can change byte array elements, but can not change the size.


Field Summary
static int MAX_MSG_SIZE
           
 
Constructor Summary
ConcastPacket(byte[] data, int datalen)
          Create the new concast packet.
 
Method Summary
 void addLength(int delta)
           
 byte[] getData()
           
 int getLength()
          Returns the length of data in the packet.
 void setLength(int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_MSG_SIZE

public static final int MAX_MSG_SIZE
Constructor Detail

ConcastPacket

public ConcastPacket(byte[] data,
                     int datalen)
Create the new concast packet. datalen has to be greater than 0.
Method Detail

getLength

public int getLength()
Returns the length of data in the packet. Note : it can be different from the size of data.

setLength

public void setLength(int len)

getData

public byte[] getData()

addLength

public void addLength(int delta)