@Override
    public void write(int b) throws IOException {
        checkWriteableState();
        checkSizeAndGrow(1);
        getCurrentPooledBuffer().getByteBuffer().put((byte) b);
    }
Gets the current {@link PooledByteBuffer} object. The underlying buffer will be flipped
so that it is ready for reading. No writes should happen to this stream once getPooledByteBuffer
has been called.
stroom-bytebuffer/src/main/java/stroom/bytebuffer/PooledByteBufferOutputStream.java