Top Description Fields Constructors Methods
com.amazon.ion.impl.bin.utf8

public Class PoolableByteBuffer

extends Poolable<PoolableByteBuffer>
Class Inheritance
Imports
java.nio.ByteBuffer

Holds a reusable ByteBuffer. Instances of this class are reusable but are NOT threadsafe. Instances are vended by ByteBufferPool#getOrCreate(). Users are expected to call close() when the decoder is no longer needed.

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv
PoolableByteBuffer(Pool<PoolableByteBuffer>
the pool to which the object will be returned upon close().
pool
)

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer

Returns:

the buffer.
getBuffer
()

Inherited from com.amazon.ion.impl.bin.utf8.Poolable:
close

Field Detail

bufferback to summary
private final ByteBuffer buffer
BUFFER_SIZE_IN_BYTESback to summary
pack-priv static final int BUFFER_SIZE_IN_BYTES

Constructor Detail

PoolableByteBufferback to summary
pack-priv PoolableByteBuffer(Pool<PoolableByteBuffer> pool)
Parameters
pool:Pool<PoolableByteBuffer>

the pool to which the object will be returned upon close().

Method Detail

getBufferback to summary
public ByteBuffer getBuffer()
Returns:ByteBuffer

the buffer.