DatagramPacket Members

DatagramPacket Members

Class Overview | This Package | All Packages

Constructors
Name Description
DatagramPacket(byte[], int) Constructs a DatagramPacket for receiving packets of length ilength.
DatagramPacket(byte[], int, InetAddress, int) Constructs a datagram packet for sending packets of length ilength to the specified port number on the specified host.

Methods
Name Description
getAddress() Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
getData() Returns the data received or the data to be sent.
getLength() Returns the length of the data to be sent or the length of the data received.
getPort() Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
setAddress(InetAddress)  
setData(byte[])  
setLength(int)  
setPort(int)