public Object readObject()

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


    public Object readObject() {
        String className = null;
        try {
            className = readUTF();
            if (protobufUtil.canSerializeWithProtobuf(protobufUtil.loadClass(className))) {
                byte[] data = readBytes();
                return deserializeWithProtobuf(data, protobufUtil.loadClass(className));
            } else {
                return delegate.readObject();
            }
        } catch (Throwable ex) {
            String message =
                    className == null ? "Unable to deserializeWithProtobuf object" : "Unable to deserializeWithProtobuf object for " + className;
            throw new ProtobufSerializationException(message, ex);
        }
    }