PacketByteBufs

public final class PacketByteBufs

Helper methods for working with and creating PacketByteBufs.

Functions

copy
Link copied to clipboard
static PacketByteBuf copy(ByteBuf buf)
Wraps the newly created buf from {@code buf.copy} in a packet byte buf.
static PacketByteBuf copy(ByteBuf buf, int index, int length)
Wraps the newly created buf from {@code buf.copy} in a packet byte buf.
create
Link copied to clipboard
static PacketByteBuf create()
Returns a new heap memory-backed instance of packet byte buf.
duplicate
Link copied to clipboard
static PacketByteBuf duplicate(ByteBuf buf)
Wraps the newly created buf from {@code buf.duplicate} in a packet byte buf.
empty
Link copied to clipboard
static PacketByteBuf empty()
Returns an empty instance of packet byte buf.
readBytes
Link copied to clipboard
static PacketByteBuf readBytes(ByteBuf buf, int length)
Wraps the newly created buf from {@code buf.readBytes} in a packet byte buf.
readRetainedSlice
Link copied to clipboard
static PacketByteBuf readRetainedSlice(ByteBuf buf, int length)
Wraps the newly created buf from {@code buf.readRetainedSlice} in a packet byte buf.
readSlice
Link copied to clipboard
static PacketByteBuf readSlice(ByteBuf buf, int length)
Wraps the newly created buf from {@code buf.readSlice} in a packet byte buf.
retainedDuplicate
Link copied to clipboard
static PacketByteBuf retainedDuplicate(ByteBuf buf)
Wraps the newly created buf from {@code buf.retainedDuplicate} in a packet byte buf.
retainedSlice
Link copied to clipboard
static PacketByteBuf retainedSlice(ByteBuf buf)
Wraps the newly created buf from {@code buf.retainedSlice} in a packet byte buf.
static PacketByteBuf retainedSlice(ByteBuf buf, int index, int length)
Wraps the newly created buf from {@code buf.retainedSlice} in a packet byte buf.
slice
Link copied to clipboard
static PacketByteBuf slice(ByteBuf buf)
Wraps the newly created buf from {@code buf.slice} in a packet byte buf.
static PacketByteBuf slice(ByteBuf buf, int index, int length)
Wraps the newly created buf from {@code buf.slice} in a packet byte buf.

Sources

jvm source
Link copied to clipboard