Class MockIndexInputWrapper

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Cloneable

    public class MockIndexInputWrapper
    extends org.apache.lucene.store.IndexInput
    Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
    • Constructor Detail

      • MockIndexInputWrapper

        public MockIndexInputWrapper​(MockDirectoryWrapper dir,
                                     String name,
                                     org.apache.lucene.store.IndexInput delegate)
        Construct an empty output buffer.
    • Method Detail

      • clone

        public Object clone()
        Overrides:
        clone in class org.apache.lucene.store.DataInput
      • getFilePointer

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

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

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

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

        public void readBytes​(byte[] b,
                              int offset,
                              int len)
                       throws IOException
        Specified by:
        readBytes in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • copyBytes

        public void copyBytes​(org.apache.lucene.store.IndexOutput out,
                              long numBytes)
                       throws IOException
        Overrides:
        copyBytes in class org.apache.lucene.store.IndexInput
        Throws:
        IOException
      • readBytes

        public void readBytes​(byte[] b,
                              int offset,
                              int len,
                              boolean useBuffer)
                       throws IOException
        Overrides:
        readBytes in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readInt

        public int readInt()
                    throws IOException
        Overrides:
        readInt in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readVInt

        public int readVInt()
                     throws IOException
        Overrides:
        readVInt in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readLong

        public long readLong()
                      throws IOException
        Overrides:
        readLong in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readVLong

        public long readVLong()
                       throws IOException
        Overrides:
        readVLong in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readString

        public String readString()
                          throws IOException
        Overrides:
        readString in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • readStringStringMap

        public Map<String,​String> readStringStringMap()
                                                     throws IOException
        Overrides:
        readStringStringMap in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • setModifiedUTF8StringsMode

        public void setModifiedUTF8StringsMode()
        Overrides:
        setModifiedUTF8StringsMode in class org.apache.lucene.store.DataInput
      • readChars

        public void readChars​(char[] buffer,
                              int start,
                              int length)
                       throws IOException
        Overrides:
        readChars in class org.apache.lucene.store.DataInput
        Throws:
        IOException
      • skipChars

        public void skipChars​(int length)
                       throws IOException
        Overrides:
        skipChars in class org.apache.lucene.store.IndexInput
        Throws:
        IOException