/**@class java.net.DatagramPacket @extends java.lang.Object This class represents a datagram packet. <p> Datagram packets are used to implement a connectionless packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order. Packet delivery is not guaranteed. @author Pavani Diwanji @author Benjamin Renaud @since JDK1.0 */ var DatagramPacket = { /**Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received. @return {Object {java.net.InetAddress}} the IP address of the machine to which this datagram is being sent or from which the datagram was received. @see java.net.InetAddress @see #setAddress(java.net.InetAddress) */ getAddress : function( ) {}, /**Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received. @return {Number} the port number on the remote host to which this datagram is being sent or from which the datagram was received. @see #setPort(int) */ getPort : function( ) {}, /**Returns the data buffer. The data received or the data to be sent starts from the {@code offset} in the buffer, and runs for {@code length} long. @return {Number} the buffer used to receive or send data @see #setData(byte[], int, int) */ getData : function( ) {}, /**Returns the offset of the data to be sent or the offset of the data received. @return {Number} the offset of the data to be sent or the offset of the data received. @since 1.2 */ getOffset : function( ) {}, /**Returns the length of the data to be sent or the length of the data received. @return {Number} the length of the data to be sent or the length of the data received. @see #setLength(int) */ getLength : function( ) {}, /**Set the data buffer for this packet. This sets the data, length and offset of the packet. @param {Object {byte[]}} buf the buffer to set for this packet @param {Number} offset the offset into the data @param {Number} length the length of the data and/or the length of the buffer used to receive data @exception NullPointerException if the argument is null @see #getData @see #getOffset @see #getLength @since 1.2 */ setData : function( ) {}, /**Sets the IP address of the machine to which this datagram is being sent. @param {Object {InetAddress}} iaddr the {@code InetAddress} @since JDK1.1 @see #getAddress() */ setAddress : function( ) {}, /**Sets 'length' without changing 'userSuppliedLength', after receiving a packet. @hide for IoBridge */ setReceivedLength : function( ) {}, /**Sets the port number on the remote host to which this datagram is being sent. @param {Number} iport the port number @since JDK1.1 @see #getPort() */ setPort : function( ) {}, /**Sets the SocketAddress (usually IP address + port number) of the remote host to which this datagram is being sent. @param {Object {SocketAddress}} address the {@code SocketAddress} @throws IllegalArgumentException if address is null or is a SocketAddress subclass not supported by this socket @since 1.4 @see #getSocketAddress */ setSocketAddress : function( ) {}, /**Gets the SocketAddress (usually IP address + port number) of the remote host that this packet is being sent to or is coming from. @return {Object {java.net.SocketAddress}} the {@code SocketAddress} @since 1.4 @see #setSocketAddress */ getSocketAddress : function( ) {}, /**Set the data buffer for this packet. With the offset of this DatagramPacket set to 0, and the length set to the length of {@code buf}. @param {Object {byte[]}} buf the buffer to set for this packet. @exception NullPointerException if the argument is null. @see #getLength @see #getData @since JDK1.1 */ setData : function( ) {}, /**Set the length for this packet. The length of the packet is the number of bytes from the packet's data buffer that will be sent, or the number of bytes of the packet's data buffer that will be used for receiving data. The length must be lesser or equal to the offset plus the length of the packet's buffer. @param {Number} length the length to set for this packet. @exception IllegalArgumentException if the length is negative of if the length is greater than the packet's data buffer length. @see #getLength @see #setData @since JDK1.1 */ setLength : function( ) {}, };