@Override
    public int read(char[] c, int off, int len) {
        if (left > len) {
            s.getChars(upto, upto + len, c, off);
            upto += len;
            left -= len;
            return len;
        } else if (0 == left) {
            // don't keep a reference (s could have been very large)
            s = null;
            return -1;
        } else {
            s.getChars(upto, upto + left, c, off);
            int r = left;
            left = 0;
            upto = s.length();
            return r;
        }
    }
Used by DocumentsWriter to implemented a StringReader that can be reset to a
new string; we use this when tokenizing the string value from a Field.
stroom-index/stroom-index-lucene553/src/test/java/stroom/index/lucene553/analyser/ReusableStringReader.java