Package org.apache.lucene.tests.store
Class MockIndexInputWrapper
- java.lang.Object
-
- org.apache.lucene.store.DataInput
-
- org.apache.lucene.store.IndexInput
-
- org.apache.lucene.store.FilterIndexInput
-
- org.apache.lucene.tests.store.MockIndexInputWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
public class MockIndexInputWrapper extends FilterIndexInput
Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.store.FilterIndexInput
in
-
-
Constructor Summary
Constructors Constructor Description MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate, MockIndexInputWrapper parent, boolean confined)Sole constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockIndexInputWrapperclone()voidclose()longgetFilePointer()longlength()bytereadByte()voidreadBytes(byte[] b, int offset, int len)voidreadBytes(byte[] b, int offset, int len, boolean useBuffer)voidreadFloats(float[] floats, int offset, int len)intreadInt()longreadLong()Map<String,String>readMapOfStrings()Set<String>readSetOfStrings()shortreadShort()StringreadString()intreadVInt()longreadVLong()intreadZInt()longreadZLong()voidseek(long pos)voidskipBytes(long numBytes)IndexInputslice(String sliceDescription, long offset, long length)StringtoString()-
Methods inherited from class org.apache.lucene.store.FilterIndexInput
getDelegate, unwrap, unwrapOnlyTest
-
Methods inherited from class org.apache.lucene.store.IndexInput
getFullSliceDescription, randomAccessSlice
-
Methods inherited from class org.apache.lucene.store.DataInput
readGroupVInt, readGroupVInts, readInts, readLongs
-
-
-
-
Constructor Detail
-
MockIndexInputWrapper
public MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate, MockIndexInputWrapper parent, boolean confined)
Sole constructor
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterIndexInput- Throws:
IOException
-
clone
public MockIndexInputWrapper clone()
- Overrides:
clonein classIndexInput
-
slice
public IndexInput slice(String sliceDescription, long offset, long length) throws IOException
- Overrides:
slicein classFilterIndexInput- Throws:
IOException
-
getFilePointer
public long getFilePointer()
- Overrides:
getFilePointerin classFilterIndexInput
-
seek
public void seek(long pos) throws IOException- Overrides:
seekin classFilterIndexInput- Throws:
IOException
-
length
public long length()
- Overrides:
lengthin classFilterIndexInput
-
readByte
public byte readByte() throws IOException- Overrides:
readBytein classFilterIndexInput- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len) throws IOException- Overrides:
readBytesin classFilterIndexInput- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len, boolean useBuffer) throws IOException- Overrides:
readBytesin classDataInput- Throws:
IOException
-
readFloats
public void readFloats(float[] floats, int offset, int len) throws IOException- Overrides:
readFloatsin classDataInput- Throws:
IOException
-
readShort
public short readShort() throws IOException- Overrides:
readShortin classDataInput- Throws:
IOException
-
readInt
public int readInt() throws IOException- Overrides:
readIntin classDataInput- Throws:
IOException
-
readLong
public long readLong() throws IOException- Overrides:
readLongin classDataInput- Throws:
IOException
-
readString
public String readString() throws IOException
- Overrides:
readStringin classDataInput- Throws:
IOException
-
readVInt
public int readVInt() throws IOException- Overrides:
readVIntin classDataInput- Throws:
IOException
-
readVLong
public long readVLong() throws IOException- Overrides:
readVLongin classDataInput- Throws:
IOException
-
readZInt
public int readZInt() throws IOException- Overrides:
readZIntin classDataInput- Throws:
IOException
-
readZLong
public long readZLong() throws IOException- Overrides:
readZLongin classDataInput- Throws:
IOException
-
skipBytes
public void skipBytes(long numBytes) throws IOException- Overrides:
skipBytesin classIndexInput- Throws:
IOException
-
readMapOfStrings
public Map<String,String> readMapOfStrings() throws IOException
- Overrides:
readMapOfStringsin classDataInput- Throws:
IOException
-
readSetOfStrings
public Set<String> readSetOfStrings() throws IOException
- Overrides:
readSetOfStringsin classDataInput- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classIndexInput
-
-