Package org.apache.lucene.store
Class MockIndexOutputWrapper
- java.lang.Object
-
- org.apache.lucene.store.DataOutput
-
- org.apache.lucene.store.IndexOutput
-
- org.apache.lucene.store.MockIndexOutputWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MockIndexOutputWrapper extends org.apache.lucene.store.IndexOutputUsed by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.
-
-
Constructor Summary
Constructors Constructor Description MockIndexOutputWrapper(MockDirectoryWrapper dir, org.apache.lucene.store.IndexOutput delegate, String name)Construct an empty output buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcopyBytes(org.apache.lucene.store.DataInput input, long numBytes)voidflush()longgetFilePointer()longlength()voidseek(long pos)voidsetLength(long length)voidwriteByte(byte b)voidwriteBytes(byte[] b, int offset, int len)
-
-
-
Constructor Detail
-
MockIndexOutputWrapper
public MockIndexOutputWrapper(MockDirectoryWrapper dir, org.apache.lucene.store.IndexOutput delegate, String name)
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.IndexOutput- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin classorg.apache.lucene.store.IndexOutput- Throws:
IOException
-
writeByte
public void writeByte(byte b) throws IOException- Specified by:
writeBytein classorg.apache.lucene.store.DataOutput- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b, int offset, int len) throws IOException- Specified by:
writeBytesin classorg.apache.lucene.store.DataOutput- Throws:
IOException
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin classorg.apache.lucene.store.IndexOutput
-
seek
public void seek(long pos) throws IOException- Specified by:
seekin classorg.apache.lucene.store.IndexOutput- Throws:
IOException
-
length
public long length() throws IOException- Specified by:
lengthin classorg.apache.lucene.store.IndexOutput- Throws:
IOException
-
setLength
public void setLength(long length) throws IOException- Overrides:
setLengthin classorg.apache.lucene.store.IndexOutput- Throws:
IOException
-
copyBytes
public void copyBytes(org.apache.lucene.store.DataInput input, long numBytes) throws IOException- Overrides:
copyBytesin classorg.apache.lucene.store.DataOutput- Throws:
IOException
-
-