@Override
    public AbstractByteBuf encodeObject(SofaResponse sofaResponse, Map<String, String> context) {
        try {
            UnsafeByteArrayOutputStream byteArray = new UnsafeByteArrayOutputStream();
            Hessian2Output output = new Hessian2Output(byteArray);
            output.setSerializerFactory(serializerFactory);
            output.writeObject(sofaResponse);
            output.close();
            return new ByteStreamWrapperByteBuf(byteArray);
        } catch (IOException e) {
            throw buildSerializeError(e.getMessage(), e);
        }
    }
@author <a href=mailto:leizhiyuan@gmail.com>leizhiyuan</a>
codec/codec-sofa-hessian/src/main/java/com/alipay/sofa/rpc/codec/sofahessian/serialize/SofaResponseHessianSerializer.java