All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladkrava.converter.TargetConverter Maven / Gradle / Ivy

Go to download

Enables conversion of Apache Avro object into popular data formats: JSON, XML, etc

There is a newer version: 1.0.1
Show newest version
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 with providing a target type
 *
 * @author Vlad Krava - [email protected]
 * @see DataSerializationException
 * @since 0.1-SNAPSHOT
 */
public interface TargetConverter {
    /**
     * Data converting specification
     *
     * @param e      - source data
     * @param aClass - converted data class type
     * @return T - converted data in a target datatype
     * @throws DataSerializationException - on any exception with serialization from source datatype to a byte array
     */
    T convert(final E e, final Class aClass) throws DataSerializationException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy