System.out and System.err
without getting anxious about any client closing the stream.
In code-language it means that it is not necessary to do:
if (out != System.out && out != System.err) {
out.close();
}
| Access | Constructor and Description |
|---|---|
| public | KeepAliveOutputStream(OutputStream
an OutputStream value, it should be standard output. out)Constructor of KeepAliveOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| private static PrintStream | |
| public static PrintStream | Returns: PrintStreamConvenience factory method that returns a non-closing PrintStream around System.err. |
| public static PrintStream | Returns: PrintStreamConvenience factory method that returns a non-closing PrintStream around System.out. |
| KeepAliveOutputStream | back to summary |
|---|---|
| public KeepAliveOutputStream(OutputStream out) Constructor of KeepAliveOutputStream.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. This method does nothing.
| |
| wrap | back to summary |
|---|---|
private static PrintStream wrap(PrintStream ps)
| |
| wrapSystemErr | back to summary |
|---|---|
| public static PrintStream wrapSystemErr() Convenience factory method that returns a non-closing PrintStream around System.err.
| |
| wrapSystemOut | back to summary |
|---|---|
| public static PrintStream wrapSystemOut() Convenience factory method that returns a non-closing PrintStream around System.out.
| |