code: public synchronized void setSocketAddress(SocketAddress address) {
          if (address == null || !(address instanceof InetSocketAddress))
              throw new IllegalArgumentException("unsupported address type");
          InetSocketAddress addr = (InetSocketAddress) address;
          if (addr.isUnresolved())
              throw new IllegalArgumentException("unresolved address");
          setAddress(addr.getAddress());
          setPort(addr.getPort());
      }
docs: Sets the SocketAddress (usually IP address + port number) of the remote
  host to which this datagram is being sent.
  
  @param address the <code>SocketAddress</code>
  @throws  IllegalArgumentException if address is null or is a
  SocketAddress subclass not supported by this socket
  
  @since 1.4
  @see #getSocketAddress