The builders already have a mergeFrom() method with the second
signature: 
http://code.google.com/apis/protocolbuffers/docs/reference/java/com/google/protobuf/AbstractMessage.Builder.html#mergeFrom(byte[],
int, int)

On Fri, Apr 16, 2010 at 3: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<protobuf%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://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