com.mockobjects.io

Class MockOutputStream

Implemented Interfaces:
Verifiable

public class MockOutputStream
extends OutputStream
implements Verifiable

Constructor Summary

MockOutputStream()

Method Summary

void
clearActualBuffer()
void
close()
void
flush()
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)

Constructor Details

MockOutputStream

public MockOutputStream()

Method Details

clearActualBuffer

public void clearActualBuffer()

close

public void close()
            throws IOException

flush

public void flush()
            throws IOException

getContents

public 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()
Throw an AssertionFailedException if any expectations have not been met.
Specified by:
verify in interface Verifiable

write

public void write(int b)
            throws IOException

Copyright © 2002 Mock Objects. All Rights Reserved.