|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectj_waste.network.Packet
This class is the base class for the packets used in J-WASTE.
| Field Summary | |
protected byte[] |
packet
|
| Constructor Summary | |
Packet()
|
|
| Method Summary | |
abstract void |
finalizePacket()
|
protected byte[] |
padCD(int l)
Returns a 0xCD pad of the specified length |
protected byte[] |
reverseBytes(byte[] b)
Reverses the byte order in a byte array of length 4. |
protected int |
reverseInt(int i)
Reverses the byte order of an int. |
protected short |
reverseShort(short s)
Reverses the byte order of a short. |
abstract byte[] |
toByteArray()
|
java.lang.String |
toString()
Presents a Packet in a nice way similar to a tcpdump. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected byte[] packet
| Constructor Detail |
public Packet()
| Method Detail |
public abstract byte[] toByteArray()
public abstract void finalizePacket()
public java.lang.String toString()
protected byte[] reverseBytes(byte[] b)
b - The byte array to be reversed.protected int reverseInt(int i)
i - The int to reverse.protected short reverseShort(short s)
s - The short to reverse.protected byte[] padCD(int l)
l - The number of bytes to be returned.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||