Since the client and server are remote, i am not sure how i can send
Descriptor along with message?
On Oct 27, 1:14 pm, Adam Vartanian <flo...@google.com> wrote:
> > I need a generic parser in java, which can de-serialize PB bytes
> > buffer into a Message or GeneratedMessage. But, GeneratedMessage
> > provides no such method to merge an arbitary PB bytes and provide an
> > instance of itself.
> From just a message's bytes you can't turn it into a Message. The
> serialized format doesn't include type information.
> You've got a couple choices. First, if you can send the message's
> Descriptor along with the message, then you can use
> DynamicMessage.parseFrom(Descriptor, byte) to deserialize it. If
> you can't send the message's Descriptor along, then you can use
> UnknownFieldSet.parseFrom(byte), but that's not going to give you
> very much at all, just tag numbers, their wiretype, and their value.
> - Adam
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