private void checkPreBufferSize(int add) {
        // Not using a post buffer
        if (postBuffer == null) {
            // Exceeded our initial buffer?
            if (preBufferPos + add > preBuffer.length) {
                // Flush our pre buffer
                postBuffer = new GetBufferByteArrayOutputStream();
                postBuffer.write(preBuffer, 0, preBufferPos);
            }
        }
    }
An output stream buffer that tries to use a given buffer first and once that
is not big enough it delegates all calls to a real ByteArrayOutputStream.
<p>
It also allows access to the buffer and pos without a copy of the array.
stroom-util/src/main/java/stroom/util/io/InitialByteArrayOutputStream.java