Code example for DataInput

Methods: readDoublereadInt

0
    this.value = v;
  } 
 
  @Override 
  public void readFields(DataInput in) throws IOException {
    this.key = in.readInt();
    this.value = in.readDouble();
  } 
 
  @Override 
  public void write(DataOutput out) throws IOException {
    out.writeInt(key);
    out.writeDouble(value);
  } 
 
  public int getKey() { 
    return key;
  } 
 
  public double getValue() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE