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.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public 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()
Verifiable
verify
in interface Verifiable
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
Copyright © 2002 Mock Objects. All Rights Reserved.