public class MockOutputStream extends java.io.OutputStream implements Verifiable
| Constructor and Description |
|---|
MockOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearActualBuffer() |
void |
close() |
void |
flush() |
java.lang.String |
getContents() |
byte[] |
getContentsAsByteArray()
Added in response to Bug report 546661.
|
void |
setExpectedCloseCalls(int closeCall) |
void |
setExpectedFlushCalls(int flushCall) |
void |
setExpectingWriteCalls(boolean expectingWriteCall) |
void |
setupThrowIOException(boolean throwException) |
void |
verify()
Throw an AssertionFailedException if any expectations have not been met.
|
void |
write(int b) |
public void clearActualBuffer()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic java.lang.String getContents()
public byte[] getContentsAsByteArray()
public void setExpectedCloseCalls(int closeCall)
public void setExpectedFlushCalls(int flushCall)
public void setExpectingWriteCalls(boolean expectingWriteCall)
public void setupThrowIOException(boolean throwException)
public void verify()
Verifiableverify in interface Verifiablepublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2002 Mock Objects. All Rights Reserved.