readRetainedSlice

static PacketByteBuf readRetainedSlice(ByteBuf buf, int length)

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

Return

the newly created slice

See also

io.netty.buffer.ByteBuf

ByteBuf#readRetainedSlice(int)

Parameters

buf

the original buf

length

the size of the new slice

Sources

jvm source
Link copied to clipboard