Base class for specialized primitive array builders.
Let's start with small chunks; typical usage is for small arrays anyway.
Also: let's expand by doubling up until 64k chunks (which is 16k entries for
Let's limit maximum size of chunks we use; helps avoid excessive allocation
overhead for huge data sets.
For now, let's limit to quarter million entries, 1 meg chunks for 32-bit
Number of total buffered entries in this buffer, counting all instances
within linked list formed by following
- Length of the next chunk to allocate
Node<T> next = new Node<T>(fullChunk, fullChunkLength);
int nextLen = fullChunkLength;
nextLen += (nextLen >> 2);
System.arraycopy(lastChunk, 0, resultArray, ptr, lastChunkEntries);
final static class Node<T>
Data stored in this node.
Number entries in the (untyped) array. Offset is assumed to be 0.
public Node(T data, int dataLen)