Class FastHttpDateFormat
java.lang.Object
org.springframework.security.web.savedrequest.FastHttpDateFormat
Utility class to generate HTTP dates.
 
This class is based on code in Apache Tomcat.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static StringCurrent formatted date.protected static longInstant on which the currentDate object was generated.protected static final SimpleDateFormatHTTP date format.Formatter cache.protected static final SimpleDateFormat[]The set of SimpleDateFormat formats to use ingetDateHeader().protected static final TimeZoneGMT time zone - all HTTP dates are on GMTParser cache.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringformatDate(long value, DateFormat threadLocalformat) Formats a specified date to HTTP format.static StringGets the current date in HTTP format.static longparseDate(String value, DateFormat[] threadLocalformats) Tries to parse the given date as an HTTP date.
- 
Field Details- 
formatHTTP date format.
- 
formatsThe set of SimpleDateFormat formats to use ingetDateHeader().
- 
gmtZoneGMT time zone - all HTTP dates are on GMT
- 
currentDateGeneratedprotected static long currentDateGeneratedInstant on which the currentDate object was generated.
- 
currentDateCurrent formatted date.
- 
formatCacheFormatter cache.
- 
parseCacheParser cache.
 
- 
- 
Method Details- 
formatDateFormats a specified date to HTTP format. If local format is notnull, it's used instead.- Parameters:
- value- Date value to format
- threadLocalformat- The format to use (or- null-- then HTTP format will be used)
- Returns:
- Formatted date
 
- 
getCurrentDateGets the current date in HTTP format.- Returns:
- Current date in HTTP format
 
- 
parseDateTries to parse the given date as an HTTP date. If local format list is notnull, it's used instead.- Parameters:
- value- The string to parse
- threadLocalformats- Array of formats to use for parsing. If- null, HTTP formats are used.
- Returns:
- Parsed date (or -1 if error occurred)
 
 
-