Nigel Pickard wrote:
> Here's my sample code. In this code, everything works for me -however
> when I change the GPBClient to use Data IO streams (just comment out
> the Object IO references and uncomment the Data IO references in
> GPBClient), that's when I get the
> "com.google.protobuf.InvalidProtocolBufferException: Protocol message
> end-group tag did not match expected tag." error.
ObjectOutputStream doesn't just write raw bytes directly to the
underlying stream, it also adds some additional header and framing data.
So in general you can't write data with an ObjectOutputStream and read
it back with a plain DataInputStream and expect things to work.
There's really no reason to use ObjectOutputStream unless you are using
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at