sb.append(Text.encodeIllegalXMLCharacters(
new String(cbuf, skippedChars, cbuf.length - skippedChars)));
// iterate terms
for (Iterator iter = fi.iterator(); iter.hasNext();) {
TermVectorOffsetInfo ti = (TermVectorOffsetInfo) iter.next();
nextStart = ti.getStartOffset();
if (nextStart - pos > 0) {
cbuf = new char[nextStart - pos];
int charsRead = reader.read(cbuf, 0, nextStart - pos);
pos += (nextStart - pos);
sb.append(Text.encodeIllegalXMLCharacters(
new String(cbuf, 0, charsRead)));
}
sb.append(hlStart);
nextStart = ti.getEndOffset();
// print term
cbuf = new char[nextStart - pos];
reader.read(cbuf, 0, nextStart - pos);
pos += (nextStart - pos);
sb.append(Text.encodeIllegalXMLCharacters(