public class FragmentMessagePacket extends FragmentPIDMSGPacket
FragmentMessageResponsePacket
.
Major ID: 254 Minor ID: 3
Constructor and Description |
---|
FragmentMessagePacket(java.lang.Integer packetID,
java.lang.Integer fragmentID,
byte[] payload)
Constructs a new FragmentMessagePacket given the packet ID, fragment ID and payload.
|
Modifier and Type | Method and Description |
---|---|
PacketProtocolInformation |
getProtocol()
Gets the protocol information.
|
static PacketProtocolInformation |
getTheProtocol()
Gets the protocol information statically.
|
boolean |
isValid()
Gets if the packet is valid.
|
byte[] |
savePayload()
Saves the packet payload to a byte array.
|
getFragmentID, getFragmentMessage, loadPayload
getPacketID
public FragmentMessagePacket(java.lang.Integer packetID, java.lang.Integer fragmentID, byte[] payload)
packetID
- The packet ID.fragmentID
- The fragment ID.payload
- The payload to store.java.lang.IllegalArgumentException
- packetID or fragmentID is less than 0.public boolean isValid()
isValid
in interface IPacket
isValid
in class FragmentPIDMSGPacket
public PacketProtocolInformation getProtocol()
public static PacketProtocolInformation getTheProtocol()
public byte[] savePayload() throws PacketException
savePayload
in interface IPacket
savePayload
in class FragmentPIDMSGPacket
PacketException
- An Exception has occurred.