public class ConcatenatingByteBufferCollector extends BytesInput implements AutoCloseable
ConcatenatingByteArrayCollector but using ByteBuffers allocated by its
ByteBufferAllocator.| Constructor and Description |
|---|
ConcatenatingByteBufferCollector(ByteBufferAllocator allocator)
Constructs a new
ConcatenatingByteBufferCollector instance with the specified allocator. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
collect(BytesInput bytesInput)
Collects the content of the specified input.
|
String |
memUsageString(String prefix) |
long |
size() |
void |
writeAllTo(OutputStream out)
writes the bytes into a stream
|
void |
writeInto(ByteBuffer buffer)
For internal use only.
|
concat, concat, copy, copy, copy, empty, from, from, from, from, from, from, from, from, fromInt, fromUnsignedVarInt, fromUnsignedVarLong, fromZigZagVarInt, fromZigZagVarLong, toByteArray, toByteBuffer, toByteBuffer, toByteBuffer, toInputStreampublic ConcatenatingByteBufferCollector(ByteBufferAllocator allocator)
ConcatenatingByteBufferCollector instance with the specified allocator.allocator - to be used for allocating the required ByteBuffer instancespublic void collect(BytesInput bytesInput)
ByteBuffer instance that can contain all
the content.bytesInput - the input which content is to be collectedpublic void close()
close in interface AutoCloseablepublic void writeAllTo(OutputStream out) throws IOException
BytesInputwriteAllTo in class BytesInputout - an output streamIOException - if there is an exception writingpublic void writeInto(ByteBuffer buffer)
BytesInputBytesInput
object.public long size()
size in class BytesInputCopyright © 2023 The Apache Software Foundation. All rights reserved.