Top Description Fields Constructors Methods
org.apache.tomcat.util.http

public Class ConcurrentDateFormat

extends Object
Class Inheritance
Imports
java.text.ParseException, .SimpleDateFormat, java.util.Date, .Locale, .Queue, .TimeZone, java.util.concurrent.ConcurrentLinkedQueue

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.

Field Summary

Modifier and TypeField and Description
private final String
private final Locale
private final Queue<SimpleDateFormat>
private final TimeZone

Constructor Summary

AccessConstructor and Description
public
ConcurrentDateFormat(String format, Locale locale, TimeZone timezone)

Method Summary

Modifier and TypeMethod and Description
private SimpleDateFormat
public String
format(Date date)

public Date
parse(String source)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

formatback to summary
private final String format
localeback to summary
private final Locale locale
queueback to summary
private final Queue<SimpleDateFormat> queue
timezoneback to summary
private final TimeZone timezone

Constructor Detail

ConcurrentDateFormatback to summary
public ConcurrentDateFormat(String format, Locale locale, TimeZone timezone)

Method Detail

createInstanceback to summary
private SimpleDateFormat createInstance()
formatback to summary
public String format(Date date)
parseback to summary
public Date parse(String source) throws ParseException