if (isClosed()) throw new SocketException("socket is closed");
  public synchronized void setSoTimeout(int timeout) throws SocketException  {    if (timeout < 0)      throw new IllegalArgumentException("Invalid timeout: " + timeout);    impl.setOption(SocketOptions.SO_TIMEOUT, new Integer(timeout));  }