text: public CharSequence subSequence(int start, int end) {int remaining = end - start;StringBuilder sb = new StringBuilder(remaining);int blockIdx = blockIndex(start);int indexInBlock = indexInBlock(start);while (remaining > 0) {Block b = blocks.get(blockIdx++);int numToAppend = Math.min(remaining, b.length - indexInBlock);sb.append(b.chars, indexInBlock, numToAppend);remaining -= numToAppend;indexInBlock = 0; }return sb.toString();}