Package org.apache.lucene.tests.analysis
Class MockReaderWrapper
java.lang.Object
java.io.Reader
org.apache.lucene.tests.analysis.MockReaderWrapper
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Wraps a Reader, and can throw random or fixed exceptions, and spoon feed read chars.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static booleanbooleanintread(char[] cbuf, int off, int len) booleanready()voidthrowExcAfterChar(int charUpto) Throw an exception after reading this many chars.voidMethods inherited from class java.io.Reader
mark, nullReader, read, read, read, reset, skip, transferTo
-
Constructor Details
-
MockReaderWrapper
-
-
Method Details
-
throwExcAfterChar
public void throwExcAfterChar(int charUpto) Throw an exception after reading this many chars. -
throwExcNext
public void throwExcNext() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
ready
public boolean ready() -
isMyEvilException
-