public final class FastHttpDateFormat extends Object
Constructor and Description |
---|
FastHttpDateFormat() |
Modifier and Type | Method and Description |
---|---|
static String |
formatDate(long value,
DateFormat threadLocalFormat)
Get the HTTP format of the specified date.
http spec only requre second precision http://tools.ietf.org/html/rfc2616#page-20 therefore we dont use the millisecond precision , but second . |
static String |
getCurrentDate()
Get the current date in HTTP format.
|
static byte[] |
getCurrentDateBytes()
Get the current date in HTTP format.
|
static long |
parseDate(String value,
DateFormat[] threadLocalformats)
Try to parse the given date as a HTTP date.
|
public static String getCurrentDate()
public static byte[] getCurrentDateBytes()
public static String formatDate(long value, DateFormat threadLocalFormat)
value
- in milli-secondsthreadLocalFormat
- the DateFormat
used if cache value was
not foundpublic static long parseDate(String value, DateFormat[] threadLocalformats)
Copyright © 2015 Oracle Corporation. All rights reserved.