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.IndexInputUsed 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 Objectclone()voidclose()voidcopyBytes(org.apache.lucene.store.IndexOutput out, long numBytes)longgetFilePointer()longlength()bytereadByte()voidreadBytes(byte[] b, int offset, int len)voidreadBytes(byte[] b, int offset, int len, boolean useBuffer)voidreadChars(char[] buffer, int start, int length)intreadInt()longreadLong()StringreadString()Map<String,String>readStringStringMap()intreadVInt()longreadVLong()voidseek(long pos)voidsetModifiedUTF8StringsMode()voidskipChars(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
clone
public Object clone()
- Overrides:
clonein classorg.apache.lucene.store.DataInput
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin classorg.apache.lucene.store.IndexInput
-
seek
public void seek(long pos) throws IOException- Specified by:
seekin classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
length
public long length()
- Specified by:
lengthin classorg.apache.lucene.store.IndexInput
-
readByte
public byte readByte() throws IOException- Specified by:
readBytein classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len) throws IOException- Specified by:
readBytesin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
copyBytes
public void copyBytes(org.apache.lucene.store.IndexOutput out, long numBytes) throws IOException- Overrides:
copyBytesin classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
readBytes
public void readBytes(byte[] b, int offset, int len, boolean useBuffer) throws IOException- Overrides:
readBytesin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readInt
public int readInt() throws IOException- Overrides:
readIntin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readVInt
public int readVInt() throws IOException- Overrides:
readVIntin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readLong
public long readLong() throws IOException- Overrides:
readLongin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readVLong
public long readVLong() throws IOException- Overrides:
readVLongin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readString
public String readString() throws IOException
- Overrides:
readStringin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readStringStringMap
public Map<String,String> readStringStringMap() throws IOException
- Overrides:
readStringStringMapin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
setModifiedUTF8StringsMode
public void setModifiedUTF8StringsMode()
- Overrides:
setModifiedUTF8StringsModein classorg.apache.lucene.store.DataInput
-
readChars
public void readChars(char[] buffer, int start, int length) throws IOException- Overrides:
readCharsin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
skipChars
public void skipChars(int length) throws IOException- Overrides:
skipCharsin classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
-