private T deserializeWithProtobuf()

in 3-extensions/serialization/dubbo-samples-protobuf-json/protobuf-json-serialization-implement/src/main/java/org/apache/dubbo/sample/protobuf/serialization/ProtobufObjectInput.java [59:68]


    private <T> T deserializeWithProtobuf(byte[] data, Class<T> clazz) throws IOException, NoSuchMethodException,
            IllegalAccessException, InvocationTargetException {
        try (ByteArrayInputStream newIs = new ByteArrayInputStream(data)) {
            if (protobufUtil.canSerializeWithProtobuf(clazz)) {
                return protobufUtil.deserializeWithProtobuf(newIs, clazz);
            } else {
                return (T) delegate.readObject();
            }
        }
    }