org.apache.catalina.util

Class 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.

Author: Stan Bailes Alex Chaffee

Constructor Summary
FastDateFormat(DateFormat df)
Method Summary
StringBufferformat(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
Note: breaks functionality of fieldPosition param.
static voidmain(String[] args)
Dateparse(String text, ParsePosition pos)

Constructor Detail

FastDateFormat

public FastDateFormat(DateFormat df)

Method Detail

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 © 2000-2011 Apache Software Foundation. All Rights Reserved.