Class AbstractDateTimeConverter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void format​(java.lang.Appendable out, java.util.Date date)
      Prints a date in UTC
      void format​(java.lang.Appendable out, java.util.Date date, java.util.TimeZone timeZone)
      Prints a date in the specified time zone
      java.lang.String format​(java.util.Date date)  
      java.lang.String format​(java.util.Date date, int offset)  
      java.lang.String format​(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
    • Constructor Detail

      • AbstractDateTimeConverter

        public AbstractDateTimeConverter()
    • Method Detail

      • format

        public java.lang.String format​(java.util.Date date)
        Specified by:
        format in interface DateTimeConverter
        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:
        format in interface DateTimeConverter
        Parameters:
        date - the date to print
        timeZone - 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:
        format in interface DateTimeConverter
        Parameters:
        date - the date to print
        offset - 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.IOException
        Description copied from interface: DateTimeConverter
        Prints a date in UTC
        Specified by:
        format in interface DateTimeConverter
        Parameters:
        out - print destination
        date - 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.IOException
        Description copied from interface: DateTimeConverter
        Prints a date in the specified time zone
        Specified by:
        format in interface DateTimeConverter
        Parameters:
        out - print destination
        date - the date to print
        timeZone - the timezone in which the date shall be printed
        Throws:
        java.io.IOException - when a print operation fails