com.sdklite.io.Serializer Maven / Gradle / Ivy
The newest version!
package com.sdklite.io;
import java.io.IOException;
import java.io.InputStream;
/**
* This class is used for object serialization
*
* @author johnsonlee
*
* @param
* The type of object to be serialized
*/
public interface Serializer {
/**
* Serialize the specified object as byte stream
*
* @param value
* The object to serialize
* @return the serialized byte stream
* @throws IOException
* If error occurred during serialization
*/
public InputStream serialize(final T value) throws IOException;
}