public interface PacketReader
PacketReaders are in general intended to help splitting
Modifier and Type | Field and Description |
---|---|
static byte[] |
SKIP_PACKET |
Modifier and Type | Method and Description |
---|---|
byte[] |
nextPacket(java.nio.ByteBuffer byteBuffer)
Create a new packet using the ByteBuffer given.
|
byte[] nextPacket(java.nio.ByteBuffer byteBuffer) throws ProtocolViolationException
If there isn't sufficient data to construct a packet, return null.
byteBuffer
- the byte buffer to use.ProtocolViolationException
- is there was an error constructing the packet.