public RingBuffer copy() {
        final char[] chars = toCharArray();
        return new RingBuffer(chars, 0, chars.length);
    }
Actually copy the buffer with the current start and end positions. The
new copy will not be affected by any changes made to the original.
stroom-util/src/test/java/stroom/util/xml/RingBuffer.java