Class KeepAliveOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.tools.ant.util.KeepAliveOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class KeepAliveOutputStream extends FilterOutputStream
Class that can be used to wrap 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();
 }