public class ExpandableBuffer extends Object implements BufferInfo, BufferInfo
ByteBufferAllocator
interface. Internally, this class is backed by an instance of
ByteBuffer.
This class is not thread safe.
| Modifier and Type | Field and Description |
|---|---|
static int |
INPUT_MODE |
static int |
OUTPUT_MODE |
| Constructor and Description |
|---|
ExpandableBuffer(int buffersize,
ByteBufferAllocator allocator)
Allocates buffer of the given size using the given allocator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns available capacity of this buffer.
|
int |
capacity()
Returns the total capacity of this buffer.
|
boolean |
hasData()
Determines if the buffer contains data.
|
int |
length()
Returns the length of this buffer.
|
String |
toString() |
public static final int INPUT_MODE
public static final int OUTPUT_MODE
public ExpandableBuffer(int buffersize,
ByteBufferAllocator allocator)
buffersize - the buffer size.allocator - allocator to be used to allocate ByteBuffers.public int capacity()
capacity in interface BufferInfopublic boolean hasData()
true if there is data in the buffer,
false otherwise.public int length()
length in interface BufferInfopublic int available()
available in interface BufferInfoCopyright © 2010 - 2020 Adobe. All Rights Reserved