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.
Constructor Summary |
ConcastPacket(byte[] data,
int datalen)
Create the new concast packet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_MSG_SIZE
public static final int MAX_MSG_SIZE
ConcastPacket
public ConcastPacket(byte[] data,
int datalen)
- Create the new concast packet.
datalen has to be greater than 0.
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)