Okay, i think i got a solution
i can create a newBuilder()  then on that mergeFrom(byte[] data, int
off, int len).buildParsed()

Sounds good.
Regards
Saptarshi


On Apr 16, 6:02 pm, Fishtank <saptarshi.g...@gmail.com> wrote:
> Hello,
> I have java byte[] (call it A), of which the first len bytes contains
> the serialized protobuf message.
> However A.length is greater than len and A.length-len bytes probably
> contains junk.
> If i were to give this to parseFrom, it would probably fail (i think).
> Since I would rather not use arraycopy to create a new byte[] with the
> len bytes of A, can
> parseFrom have one extra version whose sig looks like
> (byte[] a, int  len) or
> (byte[] a, int  off, int len)
>
> However, if there are ways around this (without having to create a new
> byte[]) do suggest.
>
> Thanks
> Saptarshi
>
> --
> 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 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/protobuf?hl=en.

-- 
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 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to