What u are doing will work.  You extend message
An then u can call a get builder function. With
That you can merge from bytes. I don't have a computer
right now but if u post again if you don't find the
function and I'll post a snippet on Monday.

On Dec 3, 3:21 pm, Koert Kuipers <koertkuip...@gmail.com> wrote:
> Hey all,
> I found a bunch of threads on this topic already, but i cannot figure it
> out.
> This is my situation:
> * proto files have been compiled and java classes for them are available
> * i need to deserialize messages with different types
> * the class of the message type is available at the time of deserialization
> as a generic type
> so i have a class with one function that looks like this:
> import com.google.protobuf.Message
> public class ProtobufDeserializer<T extends Message> {
>     public T fromByteBuffer(ByteBuffer byteBuffer) {
>        *** do something ***
>     }
> }
> Any ideas? Is Message  the wrong class/interface to extend from? I have not
> been able to find any other class/interface where i can get it to work.
> Thanks Koert

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 

Reply via email to