Package org.apache.lucene.store
Class MockIndexInputWrapper
- java.lang.Object
-
- org.apache.lucene.store.DataInput
-
- org.apache.lucene.store.IndexInput
-
- org.apache.lucene.store.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 Summary
Constructors Constructor Description MockIndexInputWrapper(MockDirectoryWrapper dir, String name, org.apache.lucene.store.IndexInput delegate)
Construct an empty output buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
void
close()
void
copyBytes(org.apache.lucene.store.IndexOutput out, long numBytes)
long
getFilePointer()
long
length()
byte
readByte()
void
readBytes(byte[] b, int offset, int len)
void
readBytes(byte[] b, int offset, int len, boolean useBuffer)
void
readChars(char[] buffer, int start, int length)
int
readInt()
long
readLong()
String
readString()
Map<String,String>
readStringStringMap()
int
readVInt()
long
readVLong()
void
seek(long pos)
void
setModifiedUTF8StringsMode()
void
skipChars(int length)
-
-
-
Constructor Detail
-
MockIndexInputWrapper
public MockIndexInputWrapper(MockDirectoryWrapper dir, String name, org.apache.lucene.store.IndexInput delegate)
Construct an empty output buffer.
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.apache.lucene.store.IndexInput
- Throws:
IOException
-
clone
public Object clone()
- Overrides:
clone
in classorg.apache.lucene.store.DataInput
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointer
in classorg.apache.lucene.store.IndexInput
-
seek
public void seek(long pos) throws IOException
- Specified by:
seek
in classorg.apache.lucene.store.IndexInput
- Throws:
IOException
-
length
public long length()
- Specified by:
length
in classorg.apache.lucene.store.IndexInput
-
readByte
public byte readByte() throws IOException
- Specified by:
readByte
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len) throws IOException
- Specified by:
readBytes
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
copyBytes
public void copyBytes(org.apache.lucene.store.IndexOutput out, long numBytes) throws IOException
- Overrides:
copyBytes
in classorg.apache.lucene.store.IndexInput
- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len, boolean useBuffer) throws IOException
- Overrides:
readBytes
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readInt
public int readInt() throws IOException
- Overrides:
readInt
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readVInt
public int readVInt() throws IOException
- Overrides:
readVInt
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Overrides:
readLong
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readVLong
public long readVLong() throws IOException
- Overrides:
readVLong
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readString
public String readString() throws IOException
- Overrides:
readString
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
readStringStringMap
public Map<String,String> readStringStringMap() throws IOException
- Overrides:
readStringStringMap
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
setModifiedUTF8StringsMode
public void setModifiedUTF8StringsMode()
- Overrides:
setModifiedUTF8StringsMode
in classorg.apache.lucene.store.DataInput
-
readChars
public void readChars(char[] buffer, int start, int length) throws IOException
- Overrides:
readChars
in classorg.apache.lucene.store.DataInput
- Throws:
IOException
-
skipChars
public void skipChars(int length) throws IOException
- Overrides:
skipChars
in classorg.apache.lucene.store.IndexInput
- Throws:
IOException
-
-