Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 429 by [email protected]: Support for ByteBuffer in java, in parseFrom the generated message class and mergeFrom in the builder class.
http://code.google.com/p/protobuf/issues/detail?id=429

The generated java message classes today contains overloaded static parseFrom(...) method thats a byte[],ByteString as parameter etc...
and the corresponding mergeFrom in the Builder class.

I think it would useful to support javas ByteBuffer or a byte[] and a startOffset and endOffset, the underlying implementation would just read the array of ByteBuffer to limit, in the case of ByteBuffer, and endOffset in the other case. The reason is the ByteBuffer could be reused over and over by resetting and setting the limit.
hopefully this change is not a big thing.

so the proposed change would be adding parseFrom(ByteBuffer data); and parseFrom(byte[] data,int startOffset, int endOffset), and the corresponding mergeFrom methods in the Builder class.

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to