Code example for DataOutput

Methods: writeDouble, writeInt

0
		this.value = input.readDouble();
		this.label = input.readInt();
	} 
 
	public void write(DataOutput output) throws IOException {
		output.writeDouble(this.value);
		output.writeInt(this.label);
	} 
 
	public int getLabel() { 
		return label;
	} 
 
	public int compareTo(Object o) {
		ValueLabelPair p = (ValueLabelPair)o;
		if (value > p.value) return 1;
		if (value < p.value) return -1;
		if (label > p.label) return 1;
		if (label < p.label) return -1;
		return 0;	}