retainedSlice

static PacketByteBuf retainedSlice(ByteBuf buf)

Wraps the newly created buf from {@code buf.retainedSlice} in a packet byte buf.

Return

a slice of the buf

See also

io.netty.buffer.ByteBuf

ByteBuf#retainedSlice()

Parameters

buf

the original buf

static PacketByteBuf retainedSlice(ByteBuf buf, int index, int length)

Wraps the newly created buf from {@code buf.retainedSlice} in a packet byte buf.

Return

a slice of the buf

See also

io.netty.buffer.ByteBuf

ByteBuf#retainedSlice(int, int)

Parameters

buf

the original buf

index

the starting index

length

the size of the copy