public class ByteArrayBuffer extends AbstractArrayBuffer
Usage Example:
ByteArrayBuffer buf = new ByteArrayBuffer(); Listresults = new ArrayList<>(); for (Object obj : listOfThingsToProcess) { for (Object x : obj.thingsThatShouldBecomeBytes()) { buf.add(someCalculation(x)); } results.add(buf.toArray()); buf.clear(); }
| Constructor and Description |
|---|
ByteArrayBuffer() |
ByteArrayBuffer(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte b) |
byte |
get(int i) |
byte[] |
toArray() |
clear, ensureCapacity, isEmpty, length, setLength