code: public synchronized boolean next(DocumentID key, LineDocTextAndOp value)
        throws IOException {
      if (pos >= end) {
        return false;
      }
  
      // key is document id, which are bytes until first space
      if (!readInto(key.getText(), SPACE)) {
        return false;
      }
  
      // read operation: i/d/u, or ins/del/upd, or insert/delete/update
      Text opText = new Text();
      if (!readInto(opText, SPACE)) {
        return false;
      }
      String opStr = opText.toString();
      DocumentAndOp.Op op;
      if (opStr.equals("i") || opStr.equals("ins") || opStr.equals("insert")) {
        op = DocumentAndOp.Op.INSERT;
      } else if (opStr.equals("d") || opStr.equals("del")
          || opStr.equals("delete")) {
        op = DocumentAndOp.Op.DELETE;
      } else if (opStr.equals("u") || opStr.equals("upd")
          || opStr.equals("update")) {
        op = DocumentAndOp.Op.UPDATE;
      } else {
        // default is insert
        op = DocumentAndOp.Op.INSERT;
      }
      value.setOp(op);
  
      if (op == DocumentAndOp.Op.DELETE) {
        return true;
      } else {
        // read rest of the line
        return readInto(value.getText(), EOL);
      }
    }
docs: /* (non-Javadoc)
  @see org.apache.hadoop.mapred.RecordReader#next(java.lang.Object, java.lang.Object)