Class AvroObjectSerializer<T extends org.apache.avro.specific.SpecificRecordBase>

  • Type Parameters:
    T - the type of the object that should be serialized

    public class AvroObjectSerializer<T extends org.apache.avro.specific.SpecificRecordBase>
    extends Object

    Utility class for serializing Avro objects

    Copyright 2021 (C) by Martin Ganserer

    Version:
    1.0.0
    Author:
    Martin Ganserer
    • Constructor Detail

      • AvroObjectSerializer

        public AvroObjectSerializer​(T object)
        Constructor
        Parameters:
        object - the object that should be serialized
    • Method Detail

      • serialize

        public byte[] serialize()
        Serialize a given Avro object
        Returns:
        a byte array
        Throws:
        AvroObjectSerializationException - if the object could not be serialized