if (! (endpoint instanceof InetSocketAddress)) throw new IllegalArgumentException ("Address type not supported");
  public void bind (SocketAddress endpoint)    throws IOException  {    if (impl == null)      throw new IOException ("Cannot initialize Socket implementation");    InetSocketAddress tmp = (InetSocketAddress) endpoint;        SecurityManager s = System.getSecurityManager ();    if (s != null)      s.checkListen (tmp.getPort ());    impl.bind (tmp.getAddress (), tmp.getPort ());  }