Code example for DataInput

Methods: readBooleanreadUTF

0
    return pid;
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    slotTaken = in.readBoolean();
    wasKilled = in.readBoolean();
    conf = new Configuration();
    conf.readFields(in);
    user = in.readUTF();
    isTaskCleanupTask = in.readBoolean();
    pid = in.readUTF();
  } 
 
  @Override 
  public void write(DataOutput out) throws IOException {
    out.writeBoolean(slotTaken);
    out.writeBoolean(wasKilled);
    conf.write(out);
    out.writeUTF(user);
Connect your IDE to all the code out there  Get Codota for Java