Package cz.o2.proxima.scheme.avro
Class AvroSerializer<T extends org.apache.avro.generic.GenericContainer>
- java.lang.Object
-
- cz.o2.proxima.scheme.avro.AvroSerializer<T>
-
- 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)
-
-
-
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
-
-