Code example for DataInput

Methods: readInt, readUTF

0
	 * {@inheritDoc} 
	 */ 
	@Override 
	public void readFields(final DataInput arg0) throws IOException {
 
		this.hostname = arg0.readUTF();
		this.port = arg0.readInt();
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	@Override 
	public void write(final DataOutput arg0) throws IOException {
 
		arg0.writeUTF(this.hostname);
		arg0.writeInt(this.port);
	} 
 
}