Package org.apache.hadoop.hbase.ipc
Class BufferChain
java.lang.Object
org.apache.hadoop.hbase.ipc.BufferChain
Chain of ByteBuffers. Used writing out an array of byte buffers.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) ByteBuffer[]
(package private) byte[]
getBytes()
Expensive.(package private) boolean
(package private) int
size()
(package private) long
write
(GatheringByteChannel channel)
-
Field Details
-
buffers
-
remaining
-
size
-
-
Constructor Details
-
BufferChain
BufferChain(ByteBuffer... buffers)
-
-
Method Details
-
getBytes
byte[] getBytes()Expensive. Makes a new buffer to hold a copy of what is in contained ByteBuffers. This call drains this instance; it cannot be used subsequent to the call.- Returns:
- A new byte buffer with the content of all contained ByteBuffers.
-
hasRemaining
boolean hasRemaining() -
write
- Throws:
IOException
-
size
int size() -
getBuffers
ByteBuffer[] getBuffers()
-