com.mockobjects.io
Class MockOutputStream
java.lang.Object
java.io.OutputStream
com.mockobjects.io.MockOutputStream
- All Implemented Interfaces:
- Verifiable
- public class MockOutputStream
- extends java.io.OutputStream
- implements Verifiable
Methods inherited from class java.io.OutputStream |
write, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockOutputStream
public MockOutputStream()
clearActualBuffer
public void clearActualBuffer()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
getContents
public java.lang.String getContents()
getContentsAsByteArray
public byte[] getContentsAsByteArray()
- Added in response to Bug report 546661.
setExpectedCloseCalls
public void setExpectedCloseCalls(int closeCall)
setExpectedFlushCalls
public void setExpectedFlushCalls(int flushCall)
setExpectingWriteCalls
public void setExpectingWriteCalls(boolean expectingWriteCall)
setupThrowIOException
public void setupThrowIOException(boolean throwException)
verify
public void verify()
- Description copied from interface:
Verifiable
- Throw an AssertionFailedException if any expectations have not been met.
- Specified by:
verify
in interface Verifiable
write
public void write(int b)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002 Mock Objects. All Rights Reserved.