Class IndexInputReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Cloneable

    public class IndexInputReader
    extends org.apache.lucene.store.IndexInput
    This is a wrapper over a Cassandra RandomAccessReader that provides an IndexInput interface for Lucene classes that need IndexInput. This is an optimisation because the Lucene DataInput reads bytes one at a time whereas the RandomAccessReader is optimised to read multibyte objects faster.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      static IndexInputReader create​(FileHandle handle)  
      static IndexInputReader create​(RandomAccessReader input)  
      static IndexInputReader create​(RandomAccessReader input, java.lang.Runnable doOnClose)  
      long getFilePointer()  
      long length()  
      byte readByte()  
      void readBytes​(byte[] bytes, int off, int len)  
      void seek​(long position)  
      org.apache.lucene.store.IndexInput slice​(java.lang.String sliceDescription, long offset, long length)  
      • Methods inherited from class org.apache.lucene.store.IndexInput

        clone, getFullSliceDescription, randomAccessSlice, skipBytes, toString
      • Methods inherited from class org.apache.lucene.store.DataInput

        readBytes, readFloats, readInt, readInts, readLong, readLongs, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • readByte

        public byte readByte()
                      throws java.io.IOException
        Specified by:
        readByte in class org.apache.lucene.store.DataInput
        Throws:
        java.io.IOException
      • readBytes

        public void readBytes​(byte[] bytes,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readBytes in class org.apache.lucene.store.DataInput
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class org.apache.lucene.store.IndexInput
      • getFilePointer

        public long getFilePointer()
        Specified by:
        getFilePointer in class org.apache.lucene.store.IndexInput
      • seek

        public void seek​(long position)
        Specified by:
        seek in class org.apache.lucene.store.IndexInput
      • length

        public long length()
        Specified by:
        length in class org.apache.lucene.store.IndexInput
      • slice

        public org.apache.lucene.store.IndexInput slice​(java.lang.String sliceDescription,
                                                        long offset,
                                                        long length)
        Specified by:
        slice in class org.apache.lucene.store.IndexInput