Class AvroSerializer<T extends org.apache.avro.generic.GenericContainer>

  • Type Parameters:
    T - SpecificAvroRecord - expected class

    public class AvroSerializer<T extends org.apache.avro.generic.GenericContainer>
    extends java.lang.Object
    Basic Avro serializer. Currently support just Specific avro record
    • Constructor Summary

      Constructors 
      Constructor Description
      AvroSerializer​(org.apache.avro.Schema schema)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T deserialize​(byte[] input)  
      T deserialize​(java.nio.ByteBuffer buffer, int start, int len)  
      byte[] serialize​(T input)  
      void serialize​(T input, java.io.ByteArrayOutputStream out)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AvroSerializer

        public AvroSerializer​(org.apache.avro.Schema schema)
    • Method Detail

      • serialize

        public byte[] serialize​(T input)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • serialize

        public void serialize​(T input,
                              java.io.ByteArrayOutputStream out)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public T deserialize​(byte[] input)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public T deserialize​(java.nio.ByteBuffer buffer,
                             int start,
                             int len)
                      throws java.io.IOException
        Throws:
        java.io.IOException