Class ResourceInputStream

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

    public class ResourceInputStream
    extends java.io.FilterInputStream
    A wrapper class for closing a ZipFile object when the InputStream derived from it is closed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.zip.ZipFile zipFile  
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceInputStream​(java.io.InputStream in, java.util.zip.ZipFile zipFile)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      • 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
    • Field Detail

      • zipFile

        private final java.util.zip.ZipFile zipFile
    • Constructor Detail

      • ResourceInputStream

        public ResourceInputStream​(java.io.InputStream in,
                                   java.util.zip.ZipFile zipFile)
        Constructor.
        Parameters:
        in - The InputStream object.
        zipFile - The ZipFile object.
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        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