lidavidm opened a new issue, #939:
URL: https://github.com/apache/arrow-java/issues/939

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   https://github.com/grpc/grpc-java/pull/12579
   
   There are public methods to get ownership of the internal ByteBuffers, 
instead of having to use reflection (which, did we actually ever need it in the 
first place?)
   
   > There's no need to dig into our internals for accessing the ByteBuffer 
(which is what GetReadableBuffer reports to do). We have zero-copy APIs. They 
can use 
[HasByteBuffer.getByteBuffer()](https://grpc.github.io/grpc-java/javadoc/io/grpc/HasByteBuffer.html)+InputStream.skip()
 to loop through the ByteBuffers. If they want to access all the byte buffers 
simultaneously (as skip() will deallocate the last byte buffer, just like 
read() does), then they can use InputStream.mark(). If they want to take over 
ownership of the ByteBuffers, then they can use 
[Detachable.detach()](https://grpc.github.io/grpc-java/javadoc/io/grpc/Detachable.html).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to