Packages This Package Prev Next Index
public final class java.net.DatagramPacket extends java.lang.Object (I-§1.12) { // Constructors public DatagramPacket(byte ibuf[], int ilength); §4.2.1 public DatagramPacket(byte ibuf[], int ilength, §4.2.2 InetAddress iaddr, int iport); // Methods public InetAddress getAddress(); §4.2.3 public byte[] getData(); §4.2.4 public int getLength(); §4.2.5 public int getPort(); §4.2.6 }This class represents a datagram packet.
public DatagramPacket(byte ibuf[], int ilength)
ibuf
-
buffer for holding the incoming datagram
ilength
-
the number of bytes to read
public DatagramPacket(byte ibuf[], int ilength,
InetAddress iaddr, int iport)
ibuf
-
the packet data
ilength
-
the packet length
iaddr
-
the desination address(§4.4)
iport
-
the destination port number
public InetAddress getAddress()
public byte[] getData()
public int getLength()
public int getPort()
Packages This Package Prev Next IndexJava API Document (HTML generated by dkramer on April 22, 1996)