public final class PacketCodec
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PacketCodec.DecodedPacket |
| Modifier and Type | Field and Description |
|---|---|
static int |
HEADER_SIZE |
static int |
PACKET_ID_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
encode(PacketRegistry registry,
Packet packet) |
static PacketCodec.DecodedPacket |
tryDecode(PacketRegistry registry,
java.nio.ByteBuffer readBuffer,
int maxFrameSize) |
public static final int HEADER_SIZE
public static final int PACKET_ID_SIZE
public static java.nio.ByteBuffer encode(PacketRegistry registry, Packet packet) throws java.io.IOException
java.io.IOExceptionpublic static PacketCodec.DecodedPacket tryDecode(PacketRegistry registry, java.nio.ByteBuffer readBuffer, int maxFrameSize) throws java.io.IOException
java.io.IOException