Class NoCloseInputStream

java.lang.Object
java.io.InputStream
com.Ostermiller.util.NoCloseInputStream
All Implemented Interfaces:
NoCloseStream, Closeable, AutoCloseable

public class NoCloseInputStream extends InputStream implements NoCloseStream
An input 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 input stream so that it can be passed to methods that read from 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