Class ConcatenatingByteBufferCollector

java.lang.Object
org.apache.parquet.bytes.BytesInput
org.apache.parquet.bytes.ConcatenatingByteBufferCollector
All Implemented Interfaces:
AutoCloseable

public class ConcatenatingByteBufferCollector extends BytesInput implements AutoCloseable
Alternative to ConcatenatingByteArrayCollector but using ByteBuffers allocated by its ByteBufferAllocator.
  • Constructor Details

  • Method Details

    • collect

      public void collect(BytesInput bytesInput)
      Collects the content of the specified input. It allocates a new ByteBuffer instance that can contain all the content.
      Parameters:
      bytesInput - the input which content is to be collected
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • writeAllTo

      public void writeAllTo(OutputStream out) throws IOException
      Description copied from class: BytesInput
      writes the bytes into a stream
      Specified by:
      writeAllTo in class BytesInput
      Parameters:
      out - an output stream
      Throws:
      IOException - if there is an exception writing
    • writeInto

      public void writeInto(ByteBuffer buffer)
    • size

      public long size()
      Specified by:
      size in class BytesInput
      Returns:
      the size in bytes that would be written
    • memUsageString

      public String memUsageString(String prefix)
      Parameters:
      prefix - a prefix to be used for every new line in the string
      Returns:
      a text representation of the memory usage of this structure