Class NonClosingJarInputStream

  • All Implemented Interfaces:
    java.io.Closeable, 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 java.util.zip.ZipInputStream

        available, closeEntry, skip
      • Methods inherited from class java.util.zip.InflaterInputStream

        fill, mark, markSupported, read, reset
      • Methods inherited from class java.io.FilterInputStream

        read
      • 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