Class InstantAsLongEncoding


  • public class InstantAsLongEncoding
    extends org.apache.avro.reflect.CustomEncoding<Instant>
    This CustomEncoding encodes/decodes Instant to a long (time in milliseconds) before encoding it in Avro format.
    Since:
    10.3
    • Constructor Detail

      • InstantAsLongEncoding

        public InstantAsLongEncoding()
    • Method Detail

      • write

        protected void write​(Object o,
                             org.apache.avro.io.Encoder encoder)
                      throws IOException
        Specified by:
        write in class org.apache.avro.reflect.CustomEncoding<Instant>
        Throws:
        IOException