jdk/src/share/classes/java/net/DatagramPacket.java
changeset 19414 931c01c5c3aa
parent 19069 1d9cb0d080e3
child 24865 09b1d992ca72
equal deleted inserted replaced
19413:56082c988815 19414:931c01c5c3aa
   137      * @throws  IllegalArgumentException if address type is not supported
   137      * @throws  IllegalArgumentException if address type is not supported
   138      * @see java.net.InetAddress
   138      * @see java.net.InetAddress
   139      *
   139      *
   140      * @since 1.4
   140      * @since 1.4
   141      */
   141      */
   142     public DatagramPacket(byte buf[], int offset, int length,
   142     public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) {
   143                           SocketAddress address) throws SocketException {
       
   144         setData(buf, offset, length);
   143         setData(buf, offset, length);
   145         setSocketAddress(address);
   144         setSocketAddress(address);
   146     }
   145     }
   147 
   146 
   148     /**
   147     /**
   173      * @param   address  the destination address.
   172      * @param   address  the destination address.
   174      * @throws  IllegalArgumentException if address type is not supported
   173      * @throws  IllegalArgumentException if address type is not supported
   175      * @since 1.4
   174      * @since 1.4
   176      * @see     java.net.InetAddress
   175      * @see     java.net.InetAddress
   177      */
   176      */
   178     public DatagramPacket(byte buf[], int length,
   177     public DatagramPacket(byte buf[], int length, SocketAddress address) {
   179                           SocketAddress address) throws SocketException {
       
   180         this(buf, 0, length, address);
   178         this(buf, 0, length, address);
   181     }
   179     }
   182 
   180 
   183     /**
   181     /**
   184      * Returns the IP address of the machine to which this datagram is being
   182      * Returns the IP address of the machine to which this datagram is being