Package com.mockobjects.io

# Class MockPrintStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
com.mockobjects.io.MockPrintStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public class MockPrintStream extends PrintStream

## Constructor Summary

Constructors
Constructor
Description
`MockPrintStream()`
`MockPrintStream(OutputStream out)`
`MockPrintStream(OutputStream out, boolean autoFlush)`

## Method Summary

Modifier and Type
Method
Description
`void`
`becomeErrorStream()`
`void`
`println(Object anObject)`
`void`
`println(String aString)`
`void`
`restoreErrorStream()`
`void`
`setExpectedPrintlnCalls(int calls)`
`void`
`setExpectedStringSegment(String aString)`
`void`
`verify()`

### Methods inherited from class java.io.PrintStream

`append, append, append, charset, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, write, write, write, writeBytes`

### Methods inherited from class java.io.OutputStream

`nullOutputStream`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockPrintStream

public MockPrintStream()

### MockPrintStream

public MockPrintStream(OutputStream out)

### MockPrintStream

public MockPrintStream(OutputStream out, boolean autoFlush)

## Method Details

### becomeErrorStream

public void becomeErrorStream()

### println

public void println(Object anObject)

Overrides:
  `println` in class `PrintStream`

### println

public void println(String aString)

Overrides:
  `println` in class `PrintStream`

### restoreErrorStream

public void restoreErrorStream()

### setExpectedPrintlnCalls

public void setExpectedPrintlnCalls(int calls)

### setExpectedStringSegment

public void setExpectedStringSegment(String aString)

### verify

public void verify()