Package io.grpc.alts.internal
Class BufUnwrapper
java.lang.Object
io.grpc.alts.internal.BufUnwrapper
- All Implemented Interfaces:
AutoCloseable
Unwraps
ByteBuf
s into ByteBuffer
s.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private static ByteBuffer[]
nioBuffers
(io.netty.buffer.ByteBuf buf, ByteBuffer[] singleBuffer) Optimized accessor for obtaining the underlying NIO buffers for a NettyByteBuf
.(package private) ByteBuffer[]
readableNioBuffers
(io.netty.buffer.ByteBuf buf) Called to get access to the underlying NIO buffers for aByteBuf
that will be used for reading.(package private) ByteBuffer[]
writableNioBuffers
(io.netty.buffer.ByteBuf buf) Called to get access to the underlying NIO buffers for aByteBuf
that will be used for writing.
-
Field Details
-
singleReadBuffer
-
singleWriteBuffer
-
-
Constructor Details
-
BufUnwrapper
BufUnwrapper()
-
-
Method Details
-
writableNioBuffers
Called to get access to the underlying NIO buffers for aByteBuf
that will be used for writing. -
readableNioBuffers
Called to get access to the underlying NIO buffers for aByteBuf
that will be used for reading. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
nioBuffers
Optimized accessor for obtaining the underlying NIO buffers for a NettyByteBuf
. Based on code from Netty'sSslHandler
. This method returns NIO buffers that span the readable region of theByteBuf
.
-