class Buffer {

    char charAt(int pos) {
        int seg = pos / segmentLen;
        int off = pos % segmentLen;

        int index = begins[seg] + off;
        return buf.charAt(index);
    }

      Buffer(CharSequence sb, int segmentLen, long seed);

}