@Override
    public CharSequence subSequence(final int off, final int len) {
        if (len < 0 || len > buffer.length || off < 0 || off >= buffer.length) {
            throw new IndexOutOfBoundsException();
        }

        int o = offset + off;
        o = o % buffer.length;
        return new RingBuffer(buffer, o, len);
    }
Gets the character at the specified index.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/RingBuffer.java