Code example for DataOutput

Methods: writeBoolean

0
  } 
  public boolean shouldDie() { 
    return shouldDie;
  } 
  public void write(DataOutput out) throws IOException {
    out.writeBoolean(shouldDie);
    if (t != null) {
      out.writeBoolean(true);
      out.writeBoolean(t.isMapTask());
      t.write(out);
    } else { 
      out.writeBoolean(false);
    } 
  } 
  public void readFields(DataInput in) throws IOException {
    shouldDie = in.readBoolean();
    boolean taskComing = in.readBoolean();
    if (taskComing) {
      boolean isMap = in.readBoolean();
      if (isMap) {