if (ie) {
if (cn instanceof HttpURLConnection) { return ((HttpURLConnection) cn).getResponseCode(); } else {
  public int getResponseCode()      throws IOException  {    if (cn == null) {      throw new IOException();    }    if (!connected) {      cn.connect();      connected = true;    }        // workaround for IE    if (ie) {      return -1;    }        return ((HttpURLConnection) cn).getResponseCode();  }