public abstract class Packet
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
TYPEBYTECOUNT
The Type byte count.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Packet(byte packetId)
Instantiates a new packet.
|
protected |
Packet(byte[] content)
Instantiates a new packet.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Gets the data.
|
byte |
getPacketId()
Gets the packet id.
|
java.lang.String |
readData(byte[] data)
Read data.
|
protected void |
setData(byte[] data)
Sets the data.
|
protected static final int TYPEBYTECOUNT
protected Packet(byte packetId)
packetId - the packet idprotected Packet(byte[] content)
content - the contentpublic byte[] getData()
public byte getPacketId()
public java.lang.String readData(byte[] data)
data - the dataprotected void setData(byte[] data)
data - the new data