if (isClosed()) throw new SocketException("socket is closed");
  public void setSoLinger(boolean on, int linger) throws SocketException  {    if (on == true)      {        if (linger < 0)          throw new IllegalArgumentException("SO_LINGER must be >= 0");        if (linger > 65535)          linger = 65535;        getImpl().setOption(SocketOptions.SO_LINGER, new Integer(linger));      }    else      {        getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(false));      }  }