public class RawPacketReader extends java.lang.Object implements PacketReader
Modifier and Type | Field and Description |
---|---|
static RawPacketReader |
INSTANCE |
SKIP_PACKET
Modifier and Type | Method and Description |
---|---|
byte[] |
nextPacket(java.nio.ByteBuffer byteBuffer)
Create a new packet using the ByteBuffer given.
|
public static final RawPacketReader INSTANCE
public byte[] nextPacket(java.nio.ByteBuffer byteBuffer) throws ProtocolViolationException
PacketReader
If there isn't sufficient data to construct a packet, return null.
nextPacket
in interface PacketReader
byteBuffer
- the byte buffer to use.ProtocolViolationException
- is there was an error constructing the packet.