public RingBuffer trimStart() {
        // Move offset forward.
        while (buffer[offset] <= SPACE && length > 0) {
            offset++;
            length--;

            if (offset >= buffer.length) {
                offset = 0;
            }
        }

        return this;
    }
Create a buffer with a specified initial size.

@param initialSize The initial size of the buffer.
stroom-util/src/test/java/stroom/util/xml/RingBuffer.java