Hi 

I am  looking for some clarification on Protobuf Bytestring Apis. I have a 
ByteString and i need to convert to a nio ByteBuffer or to a byte[] without 
having to perform a copy of underlying bytes .

toByteArray() method seems to perform a copy of bytes from backing array. 
Is this right

asReadOnlyByteBuffer() method in ByteString class. JavaDoc says The result 
uses the same backing array as the byte string, if possible. can someone 
clarify when the bytes copy will happen and when same backing array would 
get reused if i use asReadOnlyByteBuffer() method.

Thanks
Shashank

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/62d2e7e1-6382-4718-9282-79f27aa688fco%40googlegroups.com.

Reply via email to