public abstract class FragmentPIDAKNPacket extends FragmentPIDPacket implements IAcknowledgement
Constructor and Description |
---|
FragmentPIDAKNPacket(java.lang.Integer packetID,
java.lang.Boolean acknowledgement)
Constructs a new FragmentPIDPacket given the packet ID and the acknowledgement value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAcknowledgement()
Gets if the class instance is an Acknowledgement.
|
boolean |
isValid()
Gets if the packet is valid.
|
void |
loadPayload(byte[] packetData)
Loads the packet payload from save data.
|
byte[] |
savePayload()
Saves the packet payload to a byte array.
|
getPacketID
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProtocol
public FragmentPIDAKNPacket(java.lang.Integer packetID, java.lang.Boolean acknowledgement)
packetID
- The packet ID.acknowledgement
- The acknowledgement value to use.java.lang.IllegalArgumentException
- packetID is less than 0.public boolean isValid()
isValid
in interface IPacket
isValid
in class FragmentPIDPacket
public byte[] savePayload() throws PacketException
savePayload
in interface IPacket
PacketException
- An Exception has occurred.public void loadPayload(byte[] packetData) throws PacketException
loadPayload
in interface IPacket
packetData
- The packet payload data.java.lang.NullPointerException
- The new store data is null.PacketException
- An Exception has occurred.public boolean isAcknowledgement()
isAcknowledgement
in interface IAcknowledgement