class Buffer {

    CharSequence subSequence(int from, int end) {
        StringBuilder sb = new StringBuilder();
        Integer frm = null;
        final List<Integer> sgmnts = segments(from, end);
        for (Integer i1 : sgmnts) {
            if (frm == null) {
                frm = i1;
                continue;
            }
            sb.append(buf.subSequence(frm, i1));
            frm = null;
        }
        return sb;
    }

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

}