Class BlockSourceChannel

java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.BlockSourceChannel
All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable, Channel, HasArrayOps<byte[]>, HasPosition, ReadableChannel<byte[]>, ReadableSource<byte[]>, SeekableReadableChannel<byte[]>

public class BlockSourceChannel extends Object implements SeekableReadableChannel<byte[]>
  • Field Details

    • codec

      protected final org.apache.hadoop.io.compress.SplittableCompressionCodec codec
    • encodedChannel

      protected final SeekableReadableChannel<byte[]> encodedChannel
    • decodedChannelStart

      protected long decodedChannelStart
      The decoded channel is recreated on every first read after calling position(long).
    • decodedChannel

      protected ReadableChannelWithBlockAdvertisement decodedChannel
      The current non-seekable channel.
    • positionInBlock

      protected int positionInBlock
      The starting block id will be set after reading the first byte from the stream after its creation or setting the position.
    • pendingRead

      protected ByteBuffer pendingRead
    • decodedIn

      protected org.apache.hadoop.io.compress.SplitCompressionInputStream decodedIn
    • blockMode

      protected boolean blockMode
  • Constructor Details

    • BlockSourceChannel

      public BlockSourceChannel(SeekableReadableChannel<byte[]> seekable, org.apache.hadoop.io.compress.SplittableCompressionCodec codec, boolean blockMode)
  • Method Details