-
Packet.deserialize(byte[] data,
int bitOffset,
int size)
This method deserializes the data bits obtained from the wire into the
respective header and payload which are of type Packet.
protected void
This method re-computes the checksum of the bits received on the wire and
validates it with the checksum in the bits received Since the computation
of checksum varies based on the protocol, this method is overridden.
protected void
This method gets called at the end of the serialization process It is
intended for the child packets to insert some custom data into the output
byte stream which cannot be done or cannot be done efficiently during the
normal Packet.serialize() path.
byte[]
byte[]
This method serializes the header and payload from the respective
packet class, into a single stream of bytes to be sent on the wire.