Package org.conscrypt
Class AllocatedBuffer
- java.lang.Object
-
- org.conscrypt.AllocatedBuffer
-
@ExperimentalApi public abstract class AllocatedBuffer extends java.lang.Object
A buffer that was allocated by aBufferAllocator
.
-
-
Constructor Summary
Constructors Constructor Description AllocatedBuffer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract java.nio.ByteBuffer
nioBuffer()
Returns theByteBuffer
that backs this buffer.abstract AllocatedBuffer
release()
Returns the delegateByteBuffer
for reuse or garbage collection.AllocatedBuffer
retain()
Deprecated.this method is not usedstatic AllocatedBuffer
wrap(java.nio.ByteBuffer buffer)
Creates a newAllocatedBuffer
that is backed by the givenByteBuffer
.
-
-
-
Method Detail
-
nioBuffer
public abstract java.nio.ByteBuffer nioBuffer()
Returns theByteBuffer
that backs this buffer.
-
retain
@Deprecated public AllocatedBuffer retain()
Deprecated.this method is not usedReturns the current instance for backward compatibility.
-
release
public abstract AllocatedBuffer release()
Returns the delegateByteBuffer
for reuse or garbage collection.- Returns:
- this
AllocatedBuffer
instance
-
wrap
public static AllocatedBuffer wrap(java.nio.ByteBuffer buffer)
Creates a newAllocatedBuffer
that is backed by the givenByteBuffer
.
-
-