Code example for DataInput

Methods: readDouble

0
  public DoubleWritable(double value) {
    set(value);
  } 
   
  public void readFields(DataInput in) throws IOException {
    value = in.readDouble();
  } 
 
  public void write(DataOutput out) throws IOException {
    out.writeDouble(value);
  } 
   
  public void set(double value) { this.value = value; }
   
  public double get() { return value; }
 
  /** 
   * Returns true iff <code>o</code> is a DoubleWritable with the same value. 
   */ 
  public boolean equals(Object o) {
    if (!(o instanceof DoubleWritable)) {