if (impl == null) throw new SocketException ("Cannot initialize Socket implementation");
if (isClosed()) throw new SocketException("socket is closed");
  public synchronized int getSoTimeout() throws SocketException  {    if (impl == null)      throw new SocketException ("Cannot initialize Socket implementation");    Object timeout = impl.getOption(SocketOptions.SO_TIMEOUT);    if (timeout instanceof Integer)       return ((Integer)timeout).intValue();    else      return 0;  }