Code example for DataInput

Methods: readDouble, readLong

0
        + "]"; 
  } 
   
  @Override 
  public void readFields(DataInput input) throws IOException {
    this.avg = input.readDouble();
    this.stdev = input.readDouble();
    this.cnt = input.readLong();
  } 
   
  @Override 
  public void write(DataOutput output) throws IOException {
    output.writeDouble(this.avg);
    output.writeDouble(this.stdev);
    output.writeLong(this.cnt);
  } 
}