public char[] toCharArray() {
        final int len = end - start;
        final char[] tmp = new char[len];
        System.arraycopy(buffer, start, tmp, 0, len);
        return tmp;
    }
Take the specified number of characters off the start of the buffer.
stroom-util/src/main/java/stroom/util/CharBuffer.java