Code example for DatagramPacket

Methods: setLength

0
		packet.setData(buf, offset, length);
	} 
 
	/** Sets the length for this packet. */ 
	public void setLength(int length) {
		packet.setLength(length);
	} 
 
	/** 
	 * Sets the port number on the remote host to which this datagram is being 
	 * sent. 
	 */ 
	public void setPort(int iport) {
		packet.setPort(iport);
	} 
 
}