public class SegmentedBuffer extends Object
| Constructor and Description |
|---|
SegmentedBuffer() |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
appendCompletedChunk(Object[] fullChunk)
Method called to add a full Object array as a chunk buffered within
this buffer, and to obtain a new array to fill.
|
int |
bufferedSize()
Method that can be used to check how many Objects have been buffered
within this buffer.
|
Object[] |
completeAndClearBuffer(Object[] lastChunk,
int lastChunkEntries)
Method called to indicate that the buffering process is now
complete; and to construct a combined exactly-sized result
array.
|
int |
initialCapacity()
Helper method that can be used to check how much free capacity
will this instance start with.
|
Object[] |
resetAndStart()
Method called to start buffering process.
|
public Object[] resetAndStart()
public Object[] appendCompletedChunk(Object[] fullChunk)
fullChunk - Completed chunk that the caller is requesting
to append to this buffer. It is generally chunk that was
returned by an earlier call to resetAndStart() or
appendCompletedChunk(java.lang.Object[]) (although this is not required or
enforced)public Object[] completeAndClearBuffer(Object[] lastChunk, int lastChunkEntries)
Resulting array will be of generic Object[] type:
if a typed array is needed, use the method with additional
type argument.
public int initialCapacity()
public int bufferedSize()
Copyright © 2012-2014 FasterXML. All Rights Reserved.