Package org.joda.time.format
Class DateTimePrinterInternalPrinter
- java.lang.Object
-
- org.joda.time.format.DateTimePrinterInternalPrinter
-
- All Implemented Interfaces:
InternalPrinter
class DateTimePrinterInternalPrinter extends java.lang.Object implements InternalPrinter
Adapter between old and new printer interface.- Since:
- 2.4
-
-
Field Summary
Fields Modifier and Type Field Description private DateTimePrinterunderlying
-
Constructor Summary
Constructors Modifier Constructor Description privateDateTimePrinterInternalPrinter(DateTimePrinter underlying)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intestimatePrintedLength()Returns the expected maximum number of characters produced.(package private) DateTimePrintergetUnderlying()(package private) static InternalPrinterof(DateTimePrinter underlying)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.
-
-
-
Field Detail
-
underlying
private final DateTimePrinter underlying
-
-
Constructor Detail
-
DateTimePrinterInternalPrinter
private DateTimePrinterInternalPrinter(DateTimePrinter underlying)
-
-
Method Detail
-
of
static InternalPrinter of(DateTimePrinter underlying)
-
getUnderlying
DateTimePrinter getUnderlying()
-
estimatePrintedLength
public int estimatePrintedLength()
Description copied from interface:InternalPrinterReturns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.- Specified by:
estimatePrintedLengthin interfaceInternalPrinter- Returns:
- the estimated length
-
printTo
public void printTo(java.lang.Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, java.util.Locale locale) throws java.io.IOExceptionDescription copied from interface:InternalPrinterPrints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.- Specified by:
printToin interfaceInternalPrinter- 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
public void printTo(java.lang.Appendable appendable, ReadablePartial partial, java.util.Locale locale) throws java.io.IOExceptionDescription copied from interface:InternalPrinterPrints a ReadablePartial.- Specified by:
printToin interfaceInternalPrinter- 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
-
-