Package org.joda.time.format
Class InternalPrinterDateTimePrinter
java.lang.Object
org.joda.time.format.InternalPrinterDateTimePrinter
- All Implemented Interfaces:
DateTimePrinter,InternalPrinter
Adapter between old and new printer interface.
- Since:
- 2.4
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the expected maximum number of characters produced.inthashCode()(package private) static DateTimePrinterof(InternalPrinter underlying) voidprintTo(Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.voidprintTo(Writer out, ReadablePartial partial, Locale locale) Prints a ReadablePartial.voidprintTo(Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.voidprintTo(Appendable appendable, ReadablePartial partial, Locale locale) Prints a ReadablePartial.voidprintTo(StringBuffer buf, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.voidprintTo(StringBuffer buf, ReadablePartial partial, Locale locale) Prints a ReadablePartial.
-
Field Details
-
underlying
-
-
Constructor Details
-
InternalPrinterDateTimePrinter
-
-
Method Details
-
of
-
estimatePrintedLength
public int estimatePrintedLength()Description copied from interface:DateTimePrinterReturns the expected maximum number of characters produced. The actual amount should rarely exceed this estimate.- Specified by:
estimatePrintedLengthin interfaceDateTimePrinter- Specified by:
estimatePrintedLengthin interfaceInternalPrinter- Returns:
- the estimated length
-
printTo
public void printTo(StringBuffer buf, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) Description copied from interface:DateTimePrinterPrints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.- Specified by:
printToin interfaceDateTimePrinter- Parameters:
buf- formatted instant is appended to this buffer, 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
-
printTo
public void printTo(Writer out, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException Description copied from interface:DateTimePrinterPrints an instant from milliseconds since 1970-01-01T00:00:00Z, using the given Chronology.- Specified by:
printToin interfaceDateTimePrinter- Parameters:
out- formatted instant is written out, 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:
IOException- if an IO error occurs
-
printTo
public void printTo(Appendable appendable, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException Description 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:
IOException- if an IO error occurs
-
printTo
Description copied from interface:DateTimePrinterPrints a ReadablePartial.- Specified by:
printToin interfaceDateTimePrinter- Parameters:
buf- formatted partial is appended to this buffer, not nullpartial- partial to format, not nulllocale- the locale to use, null means default locale
-
printTo
Description copied from interface:DateTimePrinterPrints a ReadablePartial.- Specified by:
printToin interfaceDateTimePrinter- Parameters:
out- formatted partial is written out, not nullpartial- partial to format, not nulllocale- 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: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:
IOException- if an IO error occurs
-
equals
-
hashCode
public int hashCode()
-