|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.HttpUtil
public class HttpUtil
Useful methods related to HTTP stuff in general and Apache HTTP components in particular.
Field Summary | |
---|---|
private static SimpleDateFormat |
HTTP_DATE_FORMAT
|
Constructor Summary | |
---|---|
HttpUtil()
|
Method Summary | |
---|---|
static long |
getContentLength(org.apache.http.HttpResponse response)
Get the content length from the headers in the response. |
static String |
getContentType(org.apache.http.HttpResponse response)
Get the content type of the content from the headers in the response. |
static Date |
getDate(org.apache.http.HttpResponse response,
String header,
Date defaultValue)
|
static Date |
getLastModified(org.apache.http.HttpResponse response)
Get the date the content was last modified from the headers in the response. |
static Long |
getLong(org.apache.http.HttpResponse response,
String header,
Long defaultValue)
|
static String |
getString(org.apache.http.HttpResponse response,
String header,
String defaultValue)
|
static void |
shutdown(org.apache.http.client.HttpClient client)
Safely shuts down a http client and it's connection manager without trowing an exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final SimpleDateFormat HTTP_DATE_FORMAT
Constructor Detail |
---|
public HttpUtil()
Method Detail |
---|
public static long getContentLength(org.apache.http.HttpResponse response)
response
- The response from a HTTP request
public static Date getLastModified(org.apache.http.HttpResponse response)
response
- The response from a HTTP request
public static String getContentType(org.apache.http.HttpResponse response)
response
- The response from a HTTP request
public static String getString(org.apache.http.HttpResponse response, String header, String defaultValue)
public static Long getLong(org.apache.http.HttpResponse response, String header, Long defaultValue)
public static Date getDate(org.apache.http.HttpResponse response, String header, Date defaultValue)
public static void shutdown(org.apache.http.client.HttpClient client)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |