@Override
    public Buffer copy() {
        final char[] chars = toCharArray();
        return new CharBuffer(chars, 0, chars.length);
    }
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