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

java.lang.Object
net.sourceforge.jbizmo.commons.avro.util.AvroObjectSerializer<T>
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 Details

    • AvroObjectSerializer

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

    • serialize

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