Class ReadableByteChannelForLinesMatchingPrefix

java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.ReadableByteChannelForLinesMatchingPrefix
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, org.aksw.commons.io.buffer.array.HasArrayOps<byte[]>, org.aksw.commons.io.input.ReadableChannel<byte[]>, org.aksw.commons.io.input.ReadableSource<byte[]>

public class ReadableByteChannelForLinesMatchingPrefix extends Object implements org.aksw.commons.io.input.ReadableChannel<byte[]>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.aksw.commons.io.buffer.ring.RingBufferForBytes
     
    protected org.aksw.commons.io.input.ReadableChannel<byte[]>
     
    protected byte
     
    protected boolean
     
    protected boolean
     
    protected long
     
    protected long
     
    protected org.aksw.commons.io.binseach.BinSearchScanState
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReadableByteChannelForLinesMatchingPrefix(org.aksw.commons.io.input.ReadableChannel<byte[]> channel, org.aksw.commons.io.binseach.BinSearchScanState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    org.aksw.commons.io.buffer.array.ArrayOps<byte[]>
     
    boolean
     
    int
    read(byte[] array, int offset, int length)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.aksw.commons.io.input.ReadableSource

    readRaw
  • Field Details

    • channel

      protected org.aksw.commons.io.input.ReadableChannel<byte[]> channel
    • state

      protected org.aksw.commons.io.binseach.BinSearchScanState state
    • delimiter

      protected byte delimiter
    • position

      protected long position
    • knownDelimPos

      protected long knownDelimPos
    • isCurrentLineValidated

      protected boolean isCurrentLineValidated
    • buffer

      protected org.aksw.commons.io.buffer.ring.RingBufferForBytes buffer
    • endReached

      protected boolean endReached
  • Constructor Details

    • ReadableByteChannelForLinesMatchingPrefix

      public ReadableByteChannelForLinesMatchingPrefix(org.aksw.commons.io.input.ReadableChannel<byte[]> channel, org.aksw.commons.io.binseach.BinSearchScanState state)
  • Method Details

    • read

      public int read(byte[] array, int offset, int length) throws IOException
      Specified by:
      read in interface org.aksw.commons.io.input.ReadableSource<byte[]>
      Throws:
      IOException
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface Channel
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Channel
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • getArrayOps

      public org.aksw.commons.io.buffer.array.ArrayOps<byte[]> getArrayOps()
      Specified by:
      getArrayOps in interface org.aksw.commons.io.buffer.array.HasArrayOps<byte[]>