public class Data extends BasePacket
Modifier and Type | Field and Description |
---|---|
protected byte[] |
data |
parent, payload
Modifier and Type | Method and Description |
---|---|
IPacket |
deserialize(byte[] data,
int offset,
int length)
Deserializes this packet layer and all possible payloads
|
boolean |
equals(java.lang.Object obj) |
byte[] |
getData() |
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads
|
Data |
setData(byte[] data) |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public byte[] getData()
public Data setData(byte[] data)
data
- the data to setpublic byte[] serialize()
IPacket
public IPacket deserialize(byte[] data, int offset, int length)
IPacket
offset
- offset to start deserializing fromlength
- length of the data to deserializepublic int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket