Class DateTimePrinterInternalPrinter

java.lang.Object
org.joda.time.format.DateTimePrinterInternalPrinter
All Implemented Interfaces:
InternalPrinter

class DateTimePrinterInternalPrinter extends Object implements InternalPrinter
Adapter between old and new printer interface.
Since:
2.4
  • Field Details

  • Constructor Details

    • DateTimePrinterInternalPrinter

      private DateTimePrinterInternalPrinter(DateTimePrinter underlying)
  • Method Details

    • of

      static InternalPrinter of(DateTimePrinter underlying)
    • getUnderlying

      DateTimePrinter getUnderlying()
    • estimatePrintedLength

      public int estimatePrintedLength()
      Description copied from interface: InternalPrinter
      Returns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.
      Specified by:
      estimatePrintedLength in interface InternalPrinter
      Returns:
      the estimated length
    • printTo

      public void printTo(Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException
      Description copied from interface: InternalPrinter
      Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.
      Specified by:
      printTo in interface InternalPrinter
      Parameters:
      appendable - formatted instant is appended to, not null
      instant - millis since 1970-01-01T00:00:00Z
      chrono - the chronology to use, not null
      displayOffset - if a time zone offset is printed, force it to use this millisecond value
      displayZone - the time zone to use, null means local time
      locale - the locale to use, null means default locale
      Throws:
      IOException - if an IO error occurs
    • printTo

      public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException
      Description copied from interface: InternalPrinter
      Prints a ReadablePartial.
      Specified by:
      printTo in interface InternalPrinter
      Parameters:
      appendable - formatted instant is appended to, not null
      partial - partial to format, not null
      locale - the locale to use, null means default locale
      Throws:
      IOException - if an IO error occurs