Class NonClosingJarInputStream

  • All Implemented Interfaces:, java.lang.AutoCloseable

    public class NonClosingJarInputStream
    extends java.util.jar.JarInputStream
    When using a JarInputStream with an XML parser, the stream will be closed by the parser. This causes problems if multiple entries from the JAR need to be parsed. This implementation makes {close() a NO-OP and adds reallyClose() that will close the stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void reallyClose()  
      • Methods inherited from class java.util.jar.JarInputStream

        createZipEntry, getManifest, getNextEntry, getNextJarEntry, read
      • Methods inherited from class

        available, closeEntry, skip
      • Methods inherited from class

        fill, mark, markSupported, read, reset
      • Methods inherited from class

      • Methods inherited from class

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait