@Override
    public byte[] serialize(Object obj) throws Exception {

        UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream();
        Hessian2Output out = new Hessian2Output(bos);
        out.startMessage();
        out.writeObject(obj);
        out.completeMessage();
        out.close();
        return bos.toByteArray();
    }
@author Robert HG (254963746@qq.com) on 11/6/15.
lts-core/src/main/java/com/github/ltsopensource/remoting/serialize/Hessian2Serializable.java