public class HttpClientUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(HttpResponse response)
Unconditionally close a response.
|
public static void closeQuietly(HttpResponse response)
Example Code:
HttpResponse httpResponse = null;
try {
httpResponse = httpClient.execute(httpGet);
} catch (Exception e) {
// error handling
} finally {
HttpClientUtils.closeQuietly(httpResponse);
}
response - the HttpResponse to release resources, may be null or already
closed.