class ProtostuffDeoder implements Decoder {
    public static final ProtostuffDeoder instance = new ProtostuffDeoder();


    @Override
    public String enctype() {
        return ContentTypes.PROTOBUF_VALUE;
    }

    @Override
    public <T> T decode(Result rst, Type type) {<FILL_FUNCTION_BODY>}

    @Override
    public void pretreatment(Context ctx) {
        ctx.headers.put(Constants.HEADER_SERIALIZATION, Constants.AT_PROTOBUF);
        ctx.headers.put(Constants.HEADER_ACCEPT, ContentTypes.PROTOBUF_VALUE);
    }
}

        Object returnVal = null;
        try {
            if (rst.body().length == 0) {
                return null;
            }

            returnVal = ProtostuffUtil.deserialize(rst.body());

        } catch (Throwable ex) {
            returnVal = ex;
        }

        if (returnVal != null && returnVal instanceof Throwable) {
            if (returnVal instanceof RuntimeException) {
                throw (RuntimeException) returnVal;
            } else {
                throw new RuntimeException((Throwable) returnVal);
            }
        } else {
            return (T) returnVal;
        }
    
<no_super_class>