Code example for DataInput

Methods: readBoolean, readInt

0
      event.write(out);
    } 
  } 
 
  public void readFields(DataInput in) throws IOException {
    reset = in.readBoolean();
    events = new TezDependentTaskCompletionEvent[in.readInt()];
    for (int i = 0; i < events.length; ++i) {
      events[i] = new TezDependentTaskCompletionEvent();
      events[i].readFields(in);
    } 
  } 
 
}