com.twitter.elephantbird.mapreduce.io.BinaryConverter Maven / Gradle / Ivy
package com.twitter.elephantbird.mapreduce.io;
/**
* A simple interface to serialize and deserialize objects
*/
public interface BinaryConverter {
/* TODO : What about exceptions?
*/
/** Returns deserialized object. Throws if deserialization fails. */
M fromBytes(byte[] messageBuffer) throws DecodeException;
byte[] toBytes(M message);
}