Class NoCloseOutputStream

java.lang.Object
java.io.OutputStream
com.Ostermiller.util.NoCloseOutputStream
All Implemented Interfaces:
NoCloseStream, Closeable, Flushable, AutoCloseable

public class NoCloseOutputStream extends OutputStream implements NoCloseStream
An output stream with a close method with no effect. More information about this class is available from ostermiller.org.

This class implements the Decorator design pattern to wrap a normal output stream so that it can be passed to methods that write to it and may erroneously close it. This class is a workaround when the method cannot be modified because it is in a library.

Since:
ostermillerutils 1.01.00
Author:
Stephen Ostermiller https://ostermiller.org/contact.pl?regarding=Java+Utilities