public class KeepAliveOutputStream
extends java.io.FilterOutputStream
In code-language it means that it is not necessary to do:
if (out != System.out && out!= System.err) { out.close(); }
Constructor and Description |
---|
KeepAliveOutputStream(java.io.OutputStream out)
Constructor of KeepAliveOutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method does nothing.
|
static java.io.PrintStream |
wrapSystemErr()
Convenience factory method that returns a non-closing
PrintStream around System.err.
|
static java.io.PrintStream |
wrapSystemOut()
Convenience factory method that returns a non-closing
PrintStream around System.out.
|
public KeepAliveOutputStream(java.io.OutputStream out)
out
- an OutputStream value, it shoudl be standard output.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
- as we are overridding FilterOutputStream.public static java.io.PrintStream wrapSystemOut()
public static java.io.PrintStream wrapSystemErr()