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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatDate(long value) Get the HTTP format of the specified date.static StringGet the current date in HTTP format.static longTry to parse the given date as an HTTP date.
-
Constructor Details
-
FastHttpDateFormat
public FastHttpDateFormat()
-
-
Method Details
-
getCurrentDate
-
formatDate
Get the HTTP format of the specified date.- Parameters:
value- The date- Returns:
- the HTTP date
-
parseDate
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
-