try {
while (is.available() > 0) {
boolean docAdded = false;
final int storedDocId = is.readInt();
final byte storedSection = is.readByte();
final int termCount = is.readInt();
//Read (variable) length of node IDs + frequency + offsets
final int length = is.readFixedInt();
final DocumentImpl storedDocument = docs.getDoc(storedDocId);
//Exit if the document is not concerned
if (storedDocument == null) {