Code example for DataOutput

Methods: writeInt, writeLong

0
		score = new Integer(arg0.readInt());
	} 
	 
	@Override 
	public void write(DataOutput arg0) throws IOException {
		arg0.writeLong(userid.longValue());
		arg0.writeInt(score.intValue());
	} 
	 
	@Override 
	public int compareTo(TupleOfUserAndScore arg0) {
		Integer thisScore = this.getScore();
		Integer thatScore = ((TupleOfUserAndScore)arg0).getScore();
		return thisScore.compareTo(thatScore);
 
	} 
}