Class TypeConversion.TimestampConversion

  • All Implemented Interfaces:
    TypeConversion<java.util.Date>
    Enclosing interface:
    TypeConversion<T>

    public static class TypeConversion.TimestampConversion
    extends java.lang.Object
    implements TypeConversion<java.util.Date>
    Converts Long to Date.
    • Constructor Detail

      • TimestampConversion

        public TimestampConversion()
    • Method Detail

      • convert

        public java.util.Date convert​(org.apache.avro.Schema fieldSchema,
                                      @NotNull
                                      java.lang.Object fieldValue)
        Description copied from interface: TypeConversion
        Convert value from the source type to the target type. Runtime exceptions are thrown on invalid argument or conversion failure.
        Specified by:
        convert in interface TypeConversion<java.util.Date>
        Parameters:
        fieldSchema - avro schema to loop up the source schema
        fieldValue - value in the source type. The value cannot be null.
        Returns:
        the converted value