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
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
ConstructorsConstructorDescriptionMockIndexInputWrapper
(MockDirectoryWrapper dir, String name, IndexInput delegate, MockIndexInputWrapper parent, ReadAdvice readAdvice, boolean confined) Sole constructor -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
close()
long
isLoaded()
long
length()
void
prefetch
(long offset, long length) byte
readByte()
void
readBytes
(byte[] b, int offset, int len) void
readBytes
(byte[] b, int offset, int len, boolean useBuffer) void
readFloats
(float[] floats, int offset, int len) int
readInt()
long
readLong()
short
int
readVInt()
long
int
readZInt()
long
void
seek
(long pos) void
skipBytes
(long numBytes) slice
(String sliceDescription, long offset, long length, ReadAdvice readAdvice) toString()
void
updateReadAdvice
(ReadAdvice readAdvice) 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, readInts, readLongs
-
Constructor Details
-
MockIndexInputWrapper
public MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate, MockIndexInputWrapper parent, ReadAdvice readAdvice, boolean confined) Sole constructor
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterIndexInput
- Throws:
IOException
-
clone
- Overrides:
clone
in classIndexInput
-
slice
- Overrides:
slice
in classFilterIndexInput
- Throws:
IOException
-
slice
public IndexInput slice(String sliceDescription, long offset, long length, ReadAdvice readAdvice) throws IOException - Overrides:
slice
in classIndexInput
- Throws:
IOException
-
getFilePointer
public long getFilePointer()- Overrides:
getFilePointer
in classFilterIndexInput
-
seek
- Overrides:
seek
in classFilterIndexInput
- Throws:
IOException
-
prefetch
- Overrides:
prefetch
in classIndexInput
- Throws:
IOException
-
isLoaded
- Overrides:
isLoaded
in classIndexInput
-
updateReadAdvice
- Overrides:
updateReadAdvice
in classIndexInput
- Throws:
IOException
-
length
public long length()- Overrides:
length
in classFilterIndexInput
-
readByte
- Overrides:
readByte
in classFilterIndexInput
- Throws:
IOException
-
readBytes
- Overrides:
readBytes
in classFilterIndexInput
- Throws:
IOException
-
readBytes
- Overrides:
readBytes
in classDataInput
- Throws:
IOException
-
readFloats
- Overrides:
readFloats
in classDataInput
- Throws:
IOException
-
readShort
- Overrides:
readShort
in classDataInput
- Throws:
IOException
-
readInt
- Overrides:
readInt
in classDataInput
- Throws:
IOException
-
readLong
- Overrides:
readLong
in classDataInput
- Throws:
IOException
-
readString
- Overrides:
readString
in classDataInput
- Throws:
IOException
-
readVInt
- Overrides:
readVInt
in classDataInput
- Throws:
IOException
-
readVLong
- Overrides:
readVLong
in classDataInput
- Throws:
IOException
-
readZInt
- Overrides:
readZInt
in classDataInput
- Throws:
IOException
-
readZLong
- Overrides:
readZLong
in classDataInput
- Throws:
IOException
-
skipBytes
- Overrides:
skipBytes
in classIndexInput
- Throws:
IOException
-
readMapOfStrings
- Overrides:
readMapOfStrings
in classDataInput
- Throws:
IOException
-
readSetOfStrings
- Overrides:
readSetOfStrings
in classDataInput
- Throws:
IOException
-
toString
- Overrides:
toString
in classIndexInput
-