新項目須要 用 Java 讀取 protobuf-net-data encode以後的數據,實在是個讓人蛋疼的任務。java
protobuf-net-data 把 查詢結果封裝成 DataTable,用法本身參考原文。git
這裏說說我要作的事情
github
Understand Protobuf Encodingui
Decodinggoogle
Java ResultSetspa
Protobuf how to encoding: Google Doccode
a protocol buffer message is a series of key-value pairs
get
message Test1 { required int32 a = 1; } 08 96 01 08 = 0000 0001
Each key in the streamed message is a varint with the value (field_number << 3) | wire_type
input
int key = readVarInt(inputStream); int wireType = key & 0x07 // 0000 0001 int fieldId = key >> 3 // right shift 3.
to be continue...it