Package io.zerocopy.json.schema.format
Class AbstractDateTimeConverter
- java.lang.Object
-
- io.zerocopy.json.schema.format.AbstractDateTimeConverter
-
- All Implemented Interfaces:
DateTimeConverter
- Direct Known Subclasses:
RFC3339Converter
public abstract class AbstractDateTimeConverter extends java.lang.Object implements DateTimeConverter
-
-
Constructor Summary
Constructors Constructor Description AbstractDateTimeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformat(java.lang.Appendable out, java.util.Date date)Prints a date in UTCvoidformat(java.lang.Appendable out, java.util.Date date, java.util.TimeZone timeZone)Prints a date in the specified time zonejava.lang.Stringformat(java.util.Date date)java.lang.Stringformat(java.util.Date date, int offset)java.lang.Stringformat(java.util.Date date, java.util.TimeZone timeZone)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.zerocopy.json.schema.format.DateTimeConverter
format, parse
-
-
-
-
Method Detail
-
format
public java.lang.String format(java.util.Date date)
- Specified by:
formatin interfaceDateTimeConverter- Parameters:
date- the date to print- Returns:
- string representation of the date in UTC
-
format
public java.lang.String format(java.util.Date date, java.util.TimeZone timeZone)- Specified by:
formatin interfaceDateTimeConverter- Parameters:
date- the date to printtimeZone- the timezone in which the date shall be printed- Returns:
- string representation of the date in the specified tine zone
-
format
public java.lang.String format(java.util.Date date, int offset)- Specified by:
formatin interfaceDateTimeConverter- Parameters:
date- the date to printoffset- the timezone offset in [ms], with which the date shall be printed. Must be a multiple of 60000- Returns:
- string representation of the date with the specified offset
-
format
public void format(java.lang.Appendable out, java.util.Date date) throws java.io.IOExceptionDescription copied from interface:DateTimeConverterPrints a date in UTC- Specified by:
formatin interfaceDateTimeConverter- Parameters:
out- print destinationdate- the date to print- Throws:
java.io.IOException- when a print operation fails
-
format
public void format(java.lang.Appendable out, java.util.Date date, java.util.TimeZone timeZone) throws java.io.IOExceptionDescription copied from interface:DateTimeConverterPrints a date in the specified time zone- Specified by:
formatin interfaceDateTimeConverter- Parameters:
out- print destinationdate- the date to printtimeZone- the timezone in which the date shall be printed- Throws:
java.io.IOException- when a print operation fails
-
-