*
* @author Michael Zhou
*/
public class HessianSerializer implements Serializer {
public void serialize(Object objectToEncode, OutputStream os) throws Exception {
Hessian2Output ho = null;
try {
ho = new Hessian2Output(os);
ho.writeObject(objectToEncode);
} finally {
if (ho != null) {
try {
ho.close();
} catch (IOException e) {
}
}
}
}