Class JavaTimeConverter


  • public abstract class JavaTimeConverter
    extends java.lang.Object
    • Field Detail

      • MIN_LOCAL_DATE_TIME

        public static final java.time.LocalDateTime MIN_LOCAL_DATE_TIME
      • MIN_DATE_TIME_UTC

        public static final java.time.OffsetDateTime MIN_DATE_TIME_UTC
      • MIN_LOCAL_DATE

        public static final java.time.LocalDate MIN_LOCAL_DATE
      • MIN_LOCAL_TIME

        public static final java.time.LocalTime MIN_LOCAL_TIME
      • MIN_TIME_UTC

        public static final java.time.OffsetTime MIN_TIME_UTC
      • LOCAL_DATE_TIME_READER

        public static final JsonReader.ReadObject<java.time.LocalDateTime> LOCAL_DATE_TIME_READER
      • LOCAL_DATE_TIME_WRITER

        public static final JsonWriter.WriteObject<java.time.LocalDateTime> LOCAL_DATE_TIME_WRITER
      • ZONED_DATE_TIME_READER

        public static final JsonReader.ReadObject<java.time.ZonedDateTime> ZONED_DATE_TIME_READER
      • ZONED_DATE_TIME_WRITER

        public static final JsonWriter.WriteObject<java.time.ZonedDateTime> ZONED_DATE_TIME_WRITER
      • SQL_TIMESTAMP_READER

        private static final JsonReader.ReadObject<java.sql.Timestamp> SQL_TIMESTAMP_READER
    • Constructor Detail

      • JavaTimeConverter

        public JavaTimeConverter()
    • Method Detail

      • registerDefault

        static <T> void registerDefault​(DslJson<T> json)
      • serializeNullable

        public static void serializeNullable​(@Nullable
                                             java.time.OffsetDateTime value,
                                             JsonWriter sw)
      • serializeNullable

        public static void serializeNullable​(@Nullable
                                             java.time.LocalTime value,
                                             JsonWriter sw)
      • serializeNullable

        public static void serializeNullable​(@Nullable
                                             java.time.OffsetTime value,
                                             JsonWriter sw)
      • serializeNullable

        public static void serializeNullable​(@Nullable
                                             java.time.LocalDateTime value,
                                             JsonWriter sw)
      • serialize

        public static void serialize​(java.time.OffsetDateTime value,
                                     JsonWriter sw)
      • writeNano

        private static int writeNano​(byte[] buf,
                                     int offset,
                                     int nano)
      • serialize

        public static void serialize​(java.time.LocalTime value,
                                     JsonWriter sw)
      • serialize

        public static void serialize​(java.time.OffsetTime value,
                                     JsonWriter sw)
      • serialize

        public static void serialize​(java.time.LocalDateTime value,
                                     JsonWriter sw)
      • writeTimezone

        private static void writeTimezone​(int position,
                                          java.time.ZoneOffset zone,
                                          JsonWriter sw)
      • allDigits

        private static boolean allDigits​(char[] buffer,
                                         int start,
                                         int end)
      • deserializeDateTime

        public static java.time.OffsetDateTime deserializeDateTime​(JsonReader reader)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readNanos

        private static int readNanos​(char[] tmp,
                                     int len,
                                     int offset)
      • deserializeLocalDateTime

        public static java.time.LocalDateTime deserializeLocalDateTime​(JsonReader reader)
                                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalTime

        public static java.time.LocalTime deserializeLocalTime​(JsonReader reader)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeOffsetTime

        public static java.time.OffsetTime deserializeOffsetTime​(JsonReader reader)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeDateTimeCollection

        public static java.util.ArrayList<java.time.OffsetDateTime> deserializeDateTimeCollection​(JsonReader reader)
                                                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeDateTimeCollection

        public static void deserializeDateTimeCollection​(JsonReader reader,
                                                         java.util.Collection<java.time.OffsetDateTime> res)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeDateTimeNullableCollection

        public static java.util.ArrayList<java.time.OffsetDateTime> deserializeDateTimeNullableCollection​(JsonReader reader)
                                                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeDateTimeNullableCollection

        public static void deserializeDateTimeNullableCollection​(JsonReader reader,
                                                                 java.util.Collection<java.time.OffsetDateTime> res)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateTimeCollection

        public static java.util.ArrayList<java.time.LocalDateTime> deserializeLocalDateTimeCollection​(JsonReader reader)
                                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateTimeCollection

        public static void deserializeLocalDateTimeCollection​(JsonReader reader,
                                                              java.util.Collection<java.time.LocalDateTime> res)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateTimeNullableCollection

        public static java.util.ArrayList<java.time.LocalDateTime> deserializeLocalDateTimeNullableCollection​(JsonReader reader)
                                                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateTimeNullableCollection

        public static void deserializeLocalDateTimeNullableCollection​(JsonReader reader,
                                                                      java.util.Collection<java.time.LocalDateTime> res)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalTimeCollection

        public static java.util.ArrayList<java.time.LocalTime> deserializeLocalTimeCollection​(JsonReader reader)
                                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalTimeCollection

        public static void deserializeLocalTimeCollection​(JsonReader reader,
                                                          java.util.Collection<java.time.LocalTime> res)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalTimeNullableCollection

        public static java.util.ArrayList<java.time.LocalTime> deserializeLocalTimeNullableCollection​(JsonReader reader)
                                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalTimeNullableCollection

        public static void deserializeLocalTimeNullableCollection​(JsonReader reader,
                                                                  java.util.Collection<java.time.LocalTime> res)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • serializeNullable

        public static void serializeNullable​(@Nullable
                                             java.time.LocalDate value,
                                             JsonWriter sw)
      • serialize

        public static void serialize​(java.time.LocalDate value,
                                     JsonWriter sw)
      • deserializeLocalDate

        public static java.time.LocalDate deserializeLocalDate​(JsonReader reader)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateCollection

        public static java.util.ArrayList<java.time.LocalDate> deserializeLocalDateCollection​(JsonReader reader)
                                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateCollection

        public static void deserializeLocalDateCollection​(JsonReader reader,
                                                          java.util.Collection<java.time.LocalDate> res)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateNullableCollection

        public static java.util.ArrayList<java.time.LocalDate> deserializeLocalDateNullableCollection​(JsonReader reader)
                                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deserializeLocalDateNullableCollection

        public static void deserializeLocalDateNullableCollection​(JsonReader reader,
                                                                  java.util.Collection<java.time.LocalDate> res)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException