|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.util.http.FastHttpDateFormat
public final class FastHttpDateFormat
Utility class to generate HTTP dates.
Field Summary | |
---|---|
protected static int |
CACHE_SIZE
|
protected static String |
currentDate
Current formatted date. |
protected static ThreadLocal<SimpleDateFormat> |
FORMAT
HTTP date format. |
protected static ConcurrentHashMap<Long,String> |
formatCache
Formatter cache. |
protected static ThreadLocal |
FORMATS
ThreadLocal for the set of SimpleDateFormat formats to use in getDateHeader(). |
protected static TimeZone |
GMT_TIME_ZONE
|
protected static TimeZone |
gmtZone
|
protected static long |
nextGeneration
Instant on which the currentDate object was generated. |
protected static ConcurrentHashMap<String,Long> |
parseCache
Parser cache. |
Constructor Summary | |
---|---|
FastHttpDateFormat()
|
Method Summary | |
---|---|
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 long |
parseDate(String value,
DateFormat[] threadLocalformats)
Try to parse the given date as a HTTP date. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int CACHE_SIZE
protected static final TimeZone GMT_TIME_ZONE
protected static final ThreadLocal<SimpleDateFormat> FORMAT
protected static final TimeZone gmtZone
protected static final ThreadLocal FORMATS
protected static volatile long nextGeneration
protected static volatile String currentDate
protected static final ConcurrentHashMap<Long,String> formatCache
protected static final ConcurrentHashMap<String,Long> parseCache
Constructor Detail |
---|
public FastHttpDateFormat()
Method Detail |
---|
public static final String getCurrentDate()
public static final String formatDate(long value, DateFormat threadLocalformat)
timestamp
- in millisecthe
- formater used if cache value was not foundpublic static final long parseDate(String value, DateFormat[] threadLocalformats)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |