Class ConcurrentDateFormat
java.lang.Object
org.apache.tomcat.util.http.ConcurrentDateFormat
A thread safe wrapper around
SimpleDateFormat that does not make use of ThreadLocal and - broadly - only
creates enough SimpleDateFormat objects to satisfy the concurrency requirements.-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentDateFormat(String format, Locale locale, TimeZone timezone) Creates a thread-safe date formatter with the specified format, locale, and timezone. -
Method Summary
-
Constructor Details
-
ConcurrentDateFormat
-
-
Method Details
-
format
-
parse
Parses the given string into a date using the configured format pattern.- Parameters:
source- the string to parse- Returns:
- the parsed date
- Throws:
ParseException- if the string cannot be parsed
-