in 3-extensions/serialization/dubbo-samples-protobuf-json/protobuf-json-serialization-implement/src/main/java/org/apache/dubbo/sample/protobuf/serialization/utils/ProtobufUtils.java [73:82]
public void serializeWithProtobuf(Object o, OutputStream os) {
if (!(o instanceof MessageLite)) {
return;
}
try {
((MessageLite) o).writeTo(os);
} catch (IOException e) {
throw new RuntimeException("Google PB序列化失败,序列化对象的类型为" + o.getClass().getName(), e);
}
}