| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.databind.util.ObjectBuffer
public final class ObjectBuffer
Helper class to use for constructing Object arrays by appending entries to create arrays of various lengths (length that is not known a priori).
| Constructor Summary | |
|---|---|
ObjectBuffer()
 | 
|
| Method Summary | ||
|---|---|---|
protected  void | 
_copyTo(Object resultArray,
        int totalSize,
        Object[] lastChunk,
        int lastChunkEntries)
 | 
|
protected  void | 
_reset()
 | 
|
 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.  | 
|
 | 
completeAndClearBuffer(Object[] lastChunk,
                       int lastChunkEntries,
                       Class<T> componentType)
Type-safe alternative to completeAndClearBuffer(Object[], int), to allow
 for constructing explicitly typed result array. | 
|
 void | 
completeAndClearBuffer(Object[] lastChunk,
                       int lastChunkEntries,
                       List<Object> resultList)
 | 
|
 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.  | 
|
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ObjectBuffer()
| Method Detail | 
|---|
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 <T> T[] completeAndClearBuffer(Object[] lastChunk,
                                      int lastChunkEntries,
                                      Class<T> componentType)
completeAndClearBuffer(Object[], int), to allow
 for constructing explicitly typed result array.
componentType - Type of elements included in the buffer. Will be
   used for constructing the result array.
public void completeAndClearBuffer(Object[] lastChunk,
                                   int lastChunkEntries,
                                   List<Object> resultList)
public int initialCapacity()
public int bufferedSize()
protected void _reset()
protected final void _copyTo(Object resultArray,
                             int totalSize,
                             Object[] lastChunk,
                             int lastChunkEntries)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||