FastDateFormat, FastDatePrinterpublic interface DatePrinter
DatePrinter is the "missing" interface for the format methods of
DateFormat.
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
format(long millis) |
Formats a millisecond
long value. |
java.lang.StringBuffer |
format(long millis,
java.lang.StringBuffer buf) |
Formats a milliseond
long value into the
supplied StringBuffer. |
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos) |
Formats a
Date, Calendar or
Long (milliseconds) object. |
java.lang.String |
format(java.util.Calendar calendar) |
Formats a
Calendar object. |
java.lang.StringBuffer |
format(java.util.Calendar calendar,
java.lang.StringBuffer buf) |
Formats a
Calendar object into the
supplied StringBuffer. |
java.lang.String |
format(java.util.Date date) |
Formats a
Date object using a GregorianCalendar. |
java.lang.StringBuffer |
format(java.util.Date date,
java.lang.StringBuffer buf) |
Formats a
Date object into the
supplied StringBuffer using a GregorianCalendar. |
java.util.Locale |
getLocale() |
Gets the locale used by this printer.
|
java.lang.String |
getPattern() |
Gets the pattern used by this printer.
|
java.util.TimeZone |
getTimeZone() |
Gets the time zone used by this printer.
|
java.lang.String format(long millis)
Formats a millisecond long value.
millis - the millisecond value to formatjava.lang.String format(java.util.Date date)
Formats a Date object using a GregorianCalendar.
date - the date to formatjava.lang.String format(java.util.Calendar calendar)
Formats a Calendar object.
calendar - the calendar to formatjava.lang.StringBuffer format(long millis,
java.lang.StringBuffer buf)
Formats a milliseond long value into the
supplied StringBuffer.
millis - the millisecond value to formatbuf - the buffer to format intojava.lang.StringBuffer format(java.util.Date date,
java.lang.StringBuffer buf)
Formats a Date object into the
supplied StringBuffer using a GregorianCalendar.
date - the date to formatbuf - the buffer to format intojava.lang.StringBuffer format(java.util.Calendar calendar,
java.lang.StringBuffer buf)
Formats a Calendar object into the
supplied StringBuffer.
calendar - the calendar to formatbuf - the buffer to format intojava.lang.String getPattern()
Gets the pattern used by this printer.
SimpleDateFormat compatiblejava.util.TimeZone getTimeZone()
Gets the time zone used by this printer.
This zone is always used for Date printing.
java.util.Locale getLocale()
Gets the locale used by this printer.
java.lang.StringBuffer format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
Formats a Date, Calendar or
Long (milliseconds) object.
DateFormat.format(Object, StringBuffer, FieldPosition)obj - the object to formattoAppendTo - the buffer to append topos - the position - ignoredCopyright © 2001-2017 - Apache Software Foundation