com.vladkrava.converter.serialization.Serializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avro-converter Show documentation
Show all versions of avro-converter Show documentation
Enables conversion of Apache Avro object into popular data formats: JSON, XML, etc
package com.vladkrava.converter.serialization;
/**
* Provides low level interface for serialization from object of a generic type into the byte array.
*
* @author Vlad Krava - [email protected]
* @since 0.1-SNAPSHOT
*/
public interface Serializer {
/**
* Object serialization
*
* @param data - source of the data
* @return byte[] - serialized object
* @throws DataSerializationException - signals that some exception of some sort has occurred
* during the data serialization
*/
byte[] serialize(T data) throws DataSerializationException;
}