Package org.apache.tomcat.util.http
Class FastHttpDateFormat
- java.lang.Object
- 
- org.apache.tomcat.util.http.FastHttpDateFormat
 
- 
 public final class FastHttpDateFormat extends java.lang.ObjectUtility class to generate HTTP dates.- Author:
- Remy Maucherat
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringRFC1123_DATEDeprecated.Unused.
 - 
Constructor SummaryConstructors Constructor Description FastHttpDateFormat()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringformatDate(long value)Get the HTTP format of the specified date.static java.lang.StringformatDate(long value, java.text.DateFormat threadLocalformat)Deprecated.Unused.static java.lang.StringgetCurrentDate()Get the current date in HTTP format.static longparseDate(java.lang.String value)Try to parse the given date as an HTTP date.static longparseDate(java.lang.String value, java.text.DateFormat[] threadLocalformats)Deprecated.Unused.
 
- 
- 
- 
Field Detail- 
RFC1123_DATE@Deprecated public static final java.lang.String RFC1123_DATE Deprecated.Unused. This will be removed in Tomcat 10.The only date format permitted when generating HTTP headers.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getCurrentDatepublic static final java.lang.String getCurrentDate() Get the current date in HTTP format.- Returns:
- the HTTP date
 
 - 
formatDate@Deprecated public static final java.lang.String formatDate(long value, java.text.DateFormat threadLocalformat)Deprecated.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
 
 - 
formatDatepublic static final java.lang.String formatDate(long value) Get the HTTP format of the specified date.- Parameters:
- value- The date
- Returns:
- the HTTP date
 
 - 
parseDate@Deprecated public static final long parseDate(java.lang.String value, java.text.DateFormat[] threadLocalformats)Deprecated.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
 
 - 
parseDatepublic static final long parseDate(java.lang.String value) Try 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
 
 
- 
 
-