@Override
    public void remove(int start, int end) {
        final int removeLength = end - start;
        assert removeLength > 0;
        final char[] chars = new char[length - removeLength];
        System.arraycopy(buffer, offset, chars, 0, start);
        System.arraycopy(buffer, offset + end, chars, start, length - end);
        buffer = chars;
        length = chars.length;
        offset = 0;
    }
Create a buffer with a specified initial size.

@param initialSize The initial size of the buffer.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/CharBuffer.java