org.mydotey.codec.Codec Maven / Gradle / Ivy
The newest version!
package org.mydotey.codec;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Created by Qiang Zhao on 10/05/2016.
*/
public interface Codec {
String getMimeType();
byte[] encode(Object obj);
T decode(byte[] is, Class clazz);
void encode(OutputStream os, Object obj);
T decode(InputStream is, Class clazz);
}