Package org.joda.time.format
Interface InternalPrinter
-
- All Known Implementing Classes:
DateTimeFormat.StyleFormatter,DateTimeFormatterBuilder.CharacterLiteral,DateTimeFormatterBuilder.Composite,DateTimeFormatterBuilder.FixedNumber,DateTimeFormatterBuilder.Fraction,DateTimeFormatterBuilder.NumberFormatter,DateTimeFormatterBuilder.PaddedNumber,DateTimeFormatterBuilder.StringLiteral,DateTimeFormatterBuilder.TextField,DateTimeFormatterBuilder.TimeZoneId,DateTimeFormatterBuilder.TimeZoneName,DateTimeFormatterBuilder.TimeZoneOffset,DateTimeFormatterBuilder.TwoDigitYear,DateTimeFormatterBuilder.UnpaddedNumber,DateTimePrinterInternalPrinter,InternalPrinterDateTimePrinter
interface InternalPrinterInternal interface for creating textual representations of datetimes.This has been separated from
DateTimePrinterto avoid code duplication.- Since:
- 2.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intestimatePrintedLength()Returns the expected maximum number of characters produced.voidprintTo(java.lang.Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, java.util.Locale locale)Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.voidprintTo(java.lang.Appendable appendable, ReadablePartial partial, java.util.Locale locale)Prints a ReadablePartial.
-
-
-
Method Detail
-
estimatePrintedLength
int estimatePrintedLength()
Returns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.- Returns:
- the estimated length
-
printTo
void printTo(java.lang.Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, java.util.Locale locale) throws java.io.IOExceptionPrints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.- Parameters:
appendable- formatted instant is appended to, not nullinstant- millis since 1970-01-01T00:00:00Zchrono- the chronology to use, not nulldisplayOffset- if a time zone offset is printed, force it to use this millisecond valuedisplayZone- the time zone to use, null means local timelocale- the locale to use, null means default locale- Throws:
java.io.IOException
-
printTo
void printTo(java.lang.Appendable appendable, ReadablePartial partial, java.util.Locale locale) throws java.io.IOExceptionPrints a ReadablePartial.- Parameters:
appendable- formatted instant is appended to, not nullpartial- partial to format, not nulllocale- the locale to use, null means default locale- Throws:
java.io.IOException
-
-