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 SummaryConstructors Constructor Description MockIndexOutputWrapper(MockDirectoryWrapper dir, IndexOutput delegate, String name)Construct an empty output buffer.
 - 
Method SummaryAll 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.IndexOutputalignFilePointer, alignOffset, getName
 - 
Methods inherited from class org.apache.lucene.store.DataOutputwriteBytes, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeVInt, writeVLong, writeZInt, writeZLong
 
- 
 
- 
- 
- 
Constructor Detail- 
MockIndexOutputWrapperpublic MockIndexOutputWrapper(MockDirectoryWrapper dir, IndexOutput delegate, String name) Construct an empty output buffer.
 
- 
 - 
Method Detail- 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- IndexOutput
- Throws:
- IOException
 
 - 
writeBytepublic void writeByte(byte b) throws IOException- Specified by:
- writeBytein class- DataOutput
- Throws:
- IOException
 
 - 
writeBytespublic void writeBytes(byte[] b, int offset, int len) throws IOException- Specified by:
- writeBytesin class- DataOutput
- Throws:
- IOException
 
 - 
getFilePointerpublic long getFilePointer() - Specified by:
- getFilePointerin class- IndexOutput
 
 - 
copyBytespublic void copyBytes(DataInput input, long numBytes) throws IOException - Overrides:
- copyBytesin class- DataOutput
- Throws:
- IOException
 
 - 
getChecksumpublic long getChecksum() throws IOException- Specified by:
- getChecksumin class- IndexOutput
- Throws:
- IOException
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- IndexOutput
 
 
- 
 
-