encode to binary stream example

13 views
Skip to first unread message

J.V.

unread,
Jul 2, 2009, 10:47:21 AM7/2/09
to Protocol Buffers
Which class in the ProtoBuf Java api would be used to encode to a binary
stream?
Is there a short example or tutorial on how to encode (using Java) to a
binary stream for RCP?

a short code snippet on how to encode/decode would be super helpful.

thanks

jrv

Kenton Varda

unread,
Jul 2, 2009, 12:55:09 PM7/2/09
to J.V., Protocol Buffers
Just call writeTo():

void writeToStream(Message message, OutputStream out) {
  message.writeTo(out);
Reply all
Reply to author
Forward
0 new messages