Package org.apache.tomcat.util.http
Class FastHttpDateFormat
java.lang.Object
org.apache.tomcat.util.http.FastHttpDateFormat
Utility class to generate HTTP dates.
- Author:
- Remy Maucherat
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringformatDate(long value) Get the HTTP format of the specified date.static StringformatDate(long value, DateFormat threadLocalformat) Deprecated.Unused.static StringGet the current date in HTTP format.static longTry to parse the given date as an HTTP date.static longparseDate(String value, DateFormat[] threadLocalformats) Deprecated.Unused.
- 
Field Details- 
RFC1123_DATEDeprecated.Unused. This will be removed in Tomcat 10.The only date format permitted when generating HTTP headers.- See Also:
 
 
- 
- 
Constructor Details- 
FastHttpDateFormatpublic FastHttpDateFormat()
 
- 
- 
Method Details- 
getCurrentDateGet the current date in HTTP format.- Returns:
- the HTTP date
 
- 
formatDateDeprecated.Unused. This will be removed in Tomcat 10Get the HTTP format of the specified date.- Parameters:
- value- The date
- threadLocalformat- Ignored. The local ConcurrentDateFormat will always be used.
- Returns:
- the HTTP date
 
- 
formatDateGet the HTTP format of the specified date.- Parameters:
- value- The date
- Returns:
- the HTTP date
 
- 
parseDateDeprecated.Unused. This will be removed in Tomcat 10 UseparseDate(String)Try to parse the given date as an HTTP date.- Parameters:
- value- The HTTP date
- threadLocalformats- Ignored. The local array of ConcurrentDateFormat will always be used.
- Returns:
- the date as a long
 
- 
parseDateTry to parse the given date as an HTTP date.- Parameters:
- value- The HTTP date
- Returns:
- the date as a long or -1if the value cannot be parsed
 
 
-