Quantcast
Channel: credentiality
Viewing all articles
Browse latest Browse all 94

Read text format protobuf from file in Java

$
0
0

    java.io.InputStream inputStream = [open file and get input stream]

    java.io.InputStreamReader reader = new java.io.InputStreamReader(inputStream);

    MyProto.Builder myProtoBuilder = myProto.newBuilder();
    TextFormat.merge(reader, myProtoBuilder);


Viewing all articles
Browse latest Browse all 94

Trending Articles