@Override
    public char charAt(final int index) {
        if (index < 0 || index >= buffer.length) {
            throw new IndexOutOfBoundsException();
        }

        int off = offset + index;
        off = off % buffer.length;

        return buffer[off];
    }
Gets the character at the specified index.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/RingBuffer.java