public CharBuffer append(final char c) {
        // Double the buffer size if needed.
        if (end >= buffer.length) {
            final char[] tmp = new char[buffer.length * 2];
            System.arraycopy(buffer, 0, tmp, 0, buffer.length);
            buffer = tmp;
        }

        buffer[end++] = c;

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

@param initialSize The initial size of the buffer.
stroom-util/src/main/java/stroom/util/CharBuffer.java