Class MockIndexInput

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Cloneable

    public class MockIndexInput
    extends org.apache.lucene.store.BufferedIndexInput
    IndexInput backed by a byte[] for testing.
    • Field Summary

      • Fields inherited from class org.apache.lucene.store.BufferedIndexInput

        BUFFER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      MockIndexInput​(byte[] bytes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      long length()  
      protected void readInternal​(byte[] dest, int destOffset, int len)  
      protected void seekInternal​(long pos)  
      • Methods inherited from class org.apache.lucene.store.BufferedIndexInput

        clone, copyBytes, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
      • Methods inherited from class org.apache.lucene.store.IndexInput

        skipChars, toString
      • Methods inherited from class org.apache.lucene.store.DataInput

        readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
    • Constructor Detail

      • MockIndexInput

        public MockIndexInput​(byte[] bytes)
    • Method Detail

      • readInternal

        protected void readInternal​(byte[] dest,
                                    int destOffset,
                                    int len)
        Specified by:
        readInternal in class org.apache.lucene.store.BufferedIndexInput
      • close

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

        protected void seekInternal​(long pos)
        Specified by:
        seekInternal in class org.apache.lucene.store.BufferedIndexInput
      • length

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