Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » util » [javadoc | source]
org.apache.catalina.util
public class: FastDateFormat [javadoc | source]
java.lang.Object
   java.text.Format
      java.text.DateFormat
         org.apache.catalina.util.FastDateFormat

All Implemented Interfaces:
    Serializable, Cloneable

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.
Field Summary
 DateFormat df     
 long lastSec     
 StringBuffer sb     
 FieldPosition fp     
Fields inherited from java.text.DateFormat:
ERA_FIELD,  YEAR_FIELD,  MONTH_FIELD,  DATE_FIELD,  HOUR_OF_DAY1_FIELD,  HOUR_OF_DAY0_FIELD,  MINUTE_FIELD,  SECOND_FIELD,  MILLISECOND_FIELD,  DAY_OF_WEEK_FIELD,  DAY_OF_YEAR_FIELD,  DAY_OF_WEEK_IN_MONTH_FIELD,  WEEK_OF_YEAR_FIELD,  WEEK_OF_MONTH_FIELD,  AM_PM_FIELD,  HOUR1_FIELD,  HOUR0_FIELD,  TIMEZONE_FIELD,  FULL,  LONG,  MEDIUM,  SHORT,  DEFAULT
Constructor:
 public FastDateFormat(DateFormat df) 
Method from org.apache.catalina.util.FastDateFormat Summary:
format,   main,   parse
Methods from java.text.DateFormat:
clone,   equals,   format,   format,   format,   getAvailableLocales,   getCalendar,   getDateInstance,   getDateInstance,   getDateInstance,   getDateTimeInstance,   getDateTimeInstance,   getDateTimeInstance,   getInstance,   getNumberFormat,   getTimeInstance,   getTimeInstance,   getTimeInstance,   getTimeZone,   hashCode,   isLenient,   parse,   parse,   parseObject,   setCalendar,   setLenient,   setNumberFormat,   setTimeZone
Methods from java.text.Format:
clone,   format,   format,   formatToCharacterIterator,   parseObject,   parseObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.util.FastDateFormat Detail:
 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.
 public static  void main(String[] args) 
 public Date parse(String text,
    ParsePosition pos)