org.apache.catalina.util
Class FastDateFormat
DateFormat
org.apache.catalina.util.FastDateFormat
public class FastDateFormat
extends DateFormat
Fast date formatter that caches recently formatted date information
and uses it to avoid too-frequent calls to the underlying
formatter. Note: breaks fieldPosition param of format(Date,
StringBuffer, FieldPosition). If you care about the field
position, call the underlying DateFormat directly.
- Stan Bailes
- Alex Chaffee
StringBuffer | format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) - Note: breaks functionality of fieldPosition param.
|
static void | main(String[] args)
|
Date | parse(String text, ParsePosition pos)
|
FastDateFormat
public FastDateFormat(DateFormat df)
format
public StringBuffer format(Date date,
StringBuffer toAppendTo,
FieldPosition fieldPosition)
Note: breaks functionality of fieldPosition param. Also:
there's a bug in SimpleDateFormat with "S" and "SS", use "SSS"
instead if you want a msec field.
main
public static void main(String[] args)
parse
public Date parse(String text,
ParsePosition pos)
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.