Class NoCloseInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class NoCloseInputStream
    extends java.io.FilterInputStream
    InputStream that does not perform any operation when close() is called.
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      NoCloseInputStream​(java.io.InputStream in)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Intentionally ignoring the implementation to avoid closing the enclosing stream in such cases like iterating through zip entries...
      void doClose()  
      • Methods inherited from class java.io.FilterInputStream

        available, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoCloseInputStream

        public NoCloseInputStream​(java.io.InputStream in)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Intentionally ignoring the implementation to avoid closing the enclosing stream in such cases like iterating through zip entries... etc
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • doClose

        public void doClose()
                     throws java.io.IOException
        Throws:
        java.io.IOException