if (isClosed()) throw new SocketException("socket is closed");
  public boolean getLoopbackMode() throws SocketException  {    Object obj = impl.getOption (SocketOptions.IP_MULTICAST_LOOP);    if (obj instanceof Boolean)      return ((Boolean) obj).booleanValue ();    else      throw new SocketException ("Unexpected type");  }