|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.web.savedrequest.FastHttpDateFormat
public class FastHttpDateFormat
Utility class to generate HTTP dates.
This class is based on code in Apache Tomcat.
Field Summary | |
---|---|
protected static String |
currentDate
Current formatted date. |
protected static long |
currentDateGenerated
Instant on which the currentDate object was generated. |
protected static SimpleDateFormat |
format
HTTP date format. |
protected static HashMap<Long,String> |
formatCache
Formatter cache. |
protected static SimpleDateFormat[] |
formats
The set of SimpleDateFormat formats to use in getDateHeader() . |
protected static TimeZone |
gmtZone
GMT time zone - all HTTP dates are on GMT |
protected static HashMap<String,Long> |
parseCache
Parser cache. |
Constructor Summary | |
---|---|
FastHttpDateFormat()
|
Method Summary | |
---|---|
static String |
formatDate(long value,
DateFormat threadLocalformat)
Formats a specified date to HTTP format. |
static String |
getCurrentDate()
Gets the current date in HTTP format. |
static long |
parseDate(String value,
DateFormat[] threadLocalformats)
Tries to parse the given date as an 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 SimpleDateFormat format
protected static final SimpleDateFormat[] formats
getDateHeader()
.
protected static final TimeZone gmtZone
protected static long currentDateGenerated
protected static String currentDate
protected static final HashMap<Long,String> formatCache
protected static final HashMap<String,Long> parseCache
Constructor Detail |
---|
public FastHttpDateFormat()
Method Detail |
---|
public static final String formatDate(long value, DateFormat threadLocalformat)
null
, it's used instead.
value
- Date value to formatthreadLocalformat
- The format to use (or null
-- then HTTP format will be used)
public static final String getCurrentDate()
public static final long parseDate(String value, DateFormat[] threadLocalformats)
null
, it's used
instead.
value
- The string to parsethreadLocalformats
- Array of formats to use for parsing. If null
, HTTP formats are used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |