Class CloseResourceInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class CloseResourceInputStream
    extends FilterInputStream
    Inputstream filter that closes a given resource whenever the parent input stream is closed.
    Since:
    3.0
    Author:
    Nicklas
    Last modified
    $Date: 2011-03-15 13:55:59 +0100 (ti, 15 mar 2011) $
    • Field Detail

    • Constructor Detail

      • CloseResourceInputStream

        public CloseResourceInputStream​(InputStream parent,
                                        Closeable resource)
        Create a new stream.
        Parameters:
        parent - The parent input stream
        resource - The resource to close when the close() method is called.