org.apache.ignite.internal.util.test

## Class GridTestPrintStream

- java.lang.Object
- - java.io.OutputStream
  - - java.io.FilterOutputStream
    - - java.io.PrintStream
      - - org.apache.ignite.internal.util.test.GridTestPrintStream

All Implemented Interfaces:
  Closeable, Flushable, Appendable, AutoCloseable

    public class GridTestPrintStream
    extends PrintStream

Print stream that prints each thread group into a separate buffer. Use any of the `purge(...)` methods to print the contents of the buffer to the parent base stream or to a stream of your choice.

### Field Summary

### Fields inherited from class java.io.FilterOutputStream

`out`

### Constructor Summary

Constructors
Constructor and Description
`GridTestPrintStream(PrintStream out)` Creates test print stream around the base stream passed in.
`GridTestPrintStream(PrintStream out, ThreadGroup baseGrp)` Creates test print stream around the base stream passed in also specifying root thread group.

### Method Summary

Methods
`PrintStream` `append(char c)`
`PrintStream` `append(CharSequence csq)`
`PrintStream` `append(CharSequence csq, int start, int end)`
`void` `close()`
`void` `flush()`
`PrintStream` `format(Locale l, String format, Object... args)`
`PrintStream` `format(String format, Object... args)`
`void` `print(boolean b)`
`void` `print(char c)`
`void` `print(char[] s)`
`void` `print(double d)`
`void` `print(float f)`
`void` `print(int i)`
`void` `print(long l)`
`void` `print(Object obj)`
`void` `print(String s)`
`PrintStream` `printf(Locale l, String format, Object... args)`
`PrintStream` `printf(String format, Object... args)`
`void` `println()`
`void` `println(boolean x)`
`void` `println(char x)`
`void` `println(char[] x)`
`void` `println(double x)`
`void` `println(float x)`
`void` `println(int x)`
`void` `println(long x)`
`void` `println(Object x)`
`void` `println(String x)`
`void` `purge()` Purges print stream for this thread group to parent print stream.
`void` `purge(OutputStream out)` Purges print stream for this thread group to the stream passed in.
`void` `write(byte[] b)`
`void` `write(byte[] buf, int off, int len)`
`void` `write(int b)`

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

`checkError, clearError, setError`

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

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

### Constructor Detail

#### GridTestPrintStream

    public GridTestPrintStream(PrintStream out)

Creates test print stream around the base stream passed in. Root thread group is the parent of current thread group.

Parameters:
  `out` - Base print stream.

#### GridTestPrintStream

    public GridTestPrintStream(PrintStream out,
                       ThreadGroup baseGrp)

Creates test print stream around the base stream passed in also specifying root thread group.

Parameters:
  `out` - Base print stream.
  `baseGrp` - Thread group.

### Method Detail

#### purge

    public void purge()
               throws IOException

Purges print stream for this thread group to parent print stream.

Throws:
  `IOException` - If any error happened.

#### purge

    public void purge(OutputStream out)
               throws IOException

Purges print stream for this thread group to the stream passed in.

Parameters:
  `out` - Stream to purge to.
Throws:
  `IOException` - If any error happened.

#### println

    public void println()

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(char c)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(char x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(double d)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(double x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(float f)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(float x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(int i)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(int x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(long l)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(long x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(boolean b)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(boolean x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(char[] s)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(char[] x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(Object obj)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(Object x)

Overrides:
  `println` in class `PrintStream`

#### print

    public void print(String s)

Overrides:
  `print` in class `PrintStream`

#### println

    public void println(String x)

Overrides:
  `println` in class `PrintStream`

#### write

    public void write(byte[] buf,
             int off,
             int len)

Overrides:
  `write` in class `PrintStream`

#### close

    public void close()

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Overrides:
  `close` in class `PrintStream`

#### flush

    public void flush()

Specified by:
  `flush` in interface `Flushable`
Overrides:
  `flush` in class `PrintStream`

#### write

    public void write(int b)

Overrides:
  `write` in class `PrintStream`

#### write

    public void write(byte[] b)
               throws IOException

Overrides:
  `write` in class `FilterOutputStream`
Throws:
  `IOException`

#### append

    public PrintStream append(CharSequence csq)

Specified by:
  `append` in interface `Appendable`
Overrides:
  `append` in class `PrintStream`

#### append

    public PrintStream append(CharSequence csq,
                     int start,
                     int end)

Specified by:
  `append` in interface `Appendable`
Overrides:
  `append` in class `PrintStream`

#### append

    public PrintStream append(char c)

Specified by:
  `append` in interface `Appendable`
Overrides:
  `append` in class `PrintStream`

#### printf

    public PrintStream printf(String format,
                     Object... args)

Overrides:
  `printf` in class `PrintStream`

#### printf

    public PrintStream printf(Locale l,
                     String format,
                     Object... args)

Overrides:
  `printf` in class `PrintStream`

#### format

    public PrintStream format(String format,
                     Object... args)

Overrides:
  `format` in class `PrintStream`

#### format

    public PrintStream format(Locale l,
                     String format,
                     Object... args)

Overrides:
  `format` in class `PrintStream`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.1.0-incubating
Release Date | : May 20 2015