Protobuf uint64转java的long,数据过大时会溢出
可以这么解决:
String id = "14001908927091871061";
Long long1 = Long.parseUnsignedLong(id);
System.out.println("id: " + id);
id = "-4444835146617680555";
Long longId = Long.parseLong(id);
System.out.println("longId: " + Long.toUnsignedString(longId));
// The code above prints the following lines:
id: 14001908927091871061
longId: 14001908927091871061