Code example for DataOutput

Methods: writeIntwriteUTF

0
	 * {@inheritDoc} 
	 */ 
	@Override 
	public void write(final DataOutput arg0) throws IOException {
 
		arg0.writeUTF(this.hostname);
		arg0.writeInt(this.port);
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java