|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.twelvemonkeys.net.HTTPUtil
public class HTTPUtil
HTTPUtil
| Method Summary | |
|---|---|
static java.lang.String |
formatHTTPDate(java.util.Date pTime)
Formats the time to a HTTP date, using the RFC 1123 format, as described in RFC 2616 (HTTP/1.1), sec. |
static java.lang.String |
formatHTTPDate(long pTime)
Formats the time to a HTTP date, using the RFC 1123 format, as described in RFC 2616 (HTTP/1.1), sec. |
static long |
parseHTTPDate(java.lang.String pDate)
Parses a HTTP date string into a long representing milliseconds
since January 1, 1970 GMT. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String formatHTTPDate(long pTime)
pTime - the time
String representation of the timepublic static java.lang.String formatHTTPDate(java.util.Date pTime)
pTime - the time
String representation of the time
public static long parseHTTPDate(java.lang.String pDate)
throws java.lang.NumberFormatException
long representing milliseconds
since January 1, 1970 GMT.
Use this method with headers that contain dates, such as
If-Modified-Since or Last-Modified.
The date string may be in either RFC 1123, RFC 850 or ANSI C asctime() format, as described in RFC 2616 (HTTP/1.1), sec. 3.3
pDate - the date to parse
long value representing the date, expressed as the
number of milliseconds since January 1, 1970 GMT,
java.lang.NumberFormatException - if the date parameter is not parseable.
java.lang.IllegalArgumentException - if the date paramter is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||