AllocatedBuffer

A buffer that was allocated by a {@link BufferAllocator}.

Members

Functions

nioBuffer
ByteBuffer nioBuffer()

Returns the {@link ByteBuffer} that backs this buffer.

release
AllocatedBuffer release()

Decreases the reference count by {@code 1} and deallocates this object if the reference count reaches at {@code 0}.

retain
AllocatedBuffer retain()

Increases the reference count by {@code 1}.

Static functions

wrap
AllocatedBuffer wrap(ByteBuffer buffer)

Creates a new {@link AllocatedBuffer} that is backed by the given {@link ByteBuffer}.

Meta