Top Description Methods
io.netty5.buffer.internal

public Interface NotReadOnlyReadableComponent

Known Direct Implementers
io.netty5.buffer.unsafe.UnsafeBuffer, io.netty5.buffer.bytebuffer.NioBuffer
Imports
io.netty5.buffer.BufferComponent, java.nio.ByteBuffer

Safety by-pass that let us get java.nio.ByteBuffers from a BufferComponent that is not read-only.

This is for instance used by the SslHandler, because some javax.net.ssl.SSLEngine implementations cannot unwrap or decode packets from read-only buffers.

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer

Returns:

A new ByteBuffer, with its own position and limit, for this memory component.
mutableReadableBuffer
()

Get a ByteBuffer instance for this memory component.

Method Detail

mutableReadableBufferback to summary
public ByteBuffer mutableReadableBuffer()

Get a ByteBuffer instance for this memory component.

Note

that unlike the BufferComponent#readableBuffer() method, the ByteBuffer returned here is writable.

Returns:ByteBuffer

A new ByteBuffer, with its own position and limit, for this memory component.