code: public void setHttpClient(HttpClient httpClient) {
          if (httpClient != defaultHttpClient
                  && this.httpClient == defaultHttpClient) {
              defaultHttpClient.getConnectionManager().shutdown();
          }
          this.httpClient = httpClient;
      }
docs: Sets the HTTP client. If the new client is different from the default,
  and the default is still in use, it will be automatically closed.
  
  @param httpClient the new value, never <code>null</code>.