com.vladkrava.converter.SourceConverter 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;
import com.vladkrava.converter.serialization.DataSerializationException;
/**
* Converting data between 2 types where T is target type and E is a source
*
* @author Vlad Krava - [email protected]
* @see DataSerializationException
* @since 0.1-SNAPSHOT
*/
public interface SourceConverter {
/**
* Data converting specification
*
* @param e - source data
* @return T - converted data in a target datatype
* @throws DataSerializationException - on any exception with serialization from source datatype to a byte array
*/
T convert(E e) throws DataSerializationException;
}