code: public LabeledDocument next() {
          LabeledDocument next = nextDoc;
          try {
              advance();
          } catch (IOException ioe) {
              throw new IOError(ioe);
          }
          return next;
      }
docs: Returns the next document from the file.