Package org.apache.lucene.tests.store
Class MockIndexOutputWrapper
- java.lang.Object
-
- org.apache.lucene.store.DataOutput
-
- org.apache.lucene.store.IndexOutput
-
- org.apache.lucene.tests.store.MockIndexOutputWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MockIndexOutputWrapper extends IndexOutput
Used 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, IndexOutput delegate, String name)Construct an empty output buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcopyBytes(DataInput input, long numBytes)longgetChecksum()longgetFilePointer()StringtoString()voidwriteByte(byte b)voidwriteBytes(byte[] b, int offset, int len)-
Methods inherited from class org.apache.lucene.store.IndexOutput
alignFilePointer, alignOffset, getName
-
Methods inherited from class org.apache.lucene.store.DataOutput
writeBytes, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeVInt, writeVLong, writeZInt, writeZLong
-
-
-
-
Constructor Detail
-
MockIndexOutputWrapper
public MockIndexOutputWrapper(MockDirectoryWrapper dir, 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 classIndexOutput- Throws:
IOException
-
writeByte
public void writeByte(byte b) throws IOException- Specified by:
writeBytein classDataOutput- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b, int offset, int len) throws IOException- Specified by:
writeBytesin classDataOutput- Throws:
IOException
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin classIndexOutput
-
copyBytes
public void copyBytes(DataInput input, long numBytes) throws IOException
- Overrides:
copyBytesin classDataOutput- Throws:
IOException
-
getChecksum
public long getChecksum() throws IOException- Specified by:
getChecksumin classIndexOutput- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classIndexOutput
-
-