org.codehaus.jackson.util
Class ByteArrayBuilder
java.lang.Object
org.codehaus.jackson.util.ByteArrayBuilder
public final class ByteArrayBuilder
- extends Object
Helper class that is similar to ByteArrayOutputStream
in usage, but more geared to Jackson use cases internally.
Specific changes include segment storage (no need to have linear
backing buffer, can avoid reallocs, copying), as well API
not based on OutputStream
. In short, a very much
specialized builder object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayBuilder
public ByteArrayBuilder()
ByteArrayBuilder
public ByteArrayBuilder(int firstBlockSize)
reset
public void reset()
append
public void append(int i)
appendTwoBytes
public void appendTwoBytes(int b16)
appendThreeBytes
public void appendThreeBytes(int b24)
toByteArray
public byte[] toByteArray()
- Method called when results are finalized and we can get the
full aggregated result buffer to return to the caller