Code example for HttpHead

0
    try 
    { 
      HttpParams localHttpParams = localAndroidHttpClient.getParams();
      HttpConnectionParams.setConnectionTimeout(localHttpParams, 8000);
      HttpConnectionParams.setSoTimeout(localHttpParams, 8000);
      HttpResponse localHttpResponse = localAndroidHttpClient.execute(new HttpHead("https://www.google.com"));
      StatusLine localStatusLine = localHttpResponse.getStatusLine();
      Header[] arrayOfHeader = localHttpResponse.getAllHeaders();
      if ((localStatusLine == null) || (arrayOfHeader == null))
      { 
        Log.i(TAG, "Unable to reach https://www.google.com.");
        return false; 
      } 
      Log.d(TAG, "Fetch of https://www.google.com returned status: " + localStatusLine.getStatusCode());
      int i = localStatusLine.getStatusCode();
      boolean bool = false;
      if (i < 400)
        bool = true;
      return bool;
    } 
    catch (IOException localIOException)