Package: org.conscrypt

AllocatedBuffer

public abstract class AllocatedBuffer
A buffer that was allocated by a BufferAllocator .

Constructors

public AllocatedBuffer()

Public Methods

nioBuffer

public abstract ByteBuffer nioBuffer()
Returns the ByteBuffer that backs this buffer.

retain

public AllocatedBuffer retain()
Returns the current instance for backward compatibility.

release

public abstract AllocatedBuffer release()
Returns the delegate ByteBuffer for reuse or garbage collection.
Returns
org.conscrypt.AllocatedBuffer this AllocatedBuffer instance

wrap

public static AllocatedBuffer wrap(ByteBuffer buffer)
Creates a new AllocatedBuffer that is backed by the given ByteBuffer .