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

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

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

    Utility class for deserializing Avro objects

    Copyright 2021 (C) by Martin Ganserer

    Version:
    1.0.0
    Author:
    Martin Ganserer
    • Constructor Detail

      • AvroObjectDeserializer

        public AvroObjectDeserializer​(org.apache.avro.Schema schema)
        Constructor
        Parameters:
        schema - the schema that should be used
    • Method Detail

      • deserialize

        public T deserialize​(byte[] data)
        Deserialize an Avro object from a byte array
        Parameters:
        data - the byte array that should be used for deserialization
        Returns:
        the deserialized object
        Throws:
        AvroObjectDeserializationException - if the object could not be deserialized