Code example for DataInput

Methods: readDouble, readInt

0
		return _value;
	} 
	 
	@Override 
	public void readFields(DataInput arg0) throws IOException {
		_destination = arg0.readInt();
		_value = arg0.readDouble();
	} 
 
	@Override 
	public void write(DataOutput arg0) throws IOException {
		arg0.writeInt(_destination);
		arg0.writeDouble(_value);
	} 
 
	@Override 
	public String toString() {
		return _destination + " - " + _value;
	} 
}