Class JarArchiveInputStream

    • Constructor Detail

      • JarArchiveInputStream

        public JarArchiveInputStream​(java.io.InputStream inputStream)
        Creates an instance from the input stream using the default encoding.
        Parameters:
        inputStream - the input stream to wrap
      • JarArchiveInputStream

        public JarArchiveInputStream​(java.io.InputStream inputStream,
                                     java.lang.String encoding)
        Creates an instance from the input stream using the specified encoding.
        Parameters:
        inputStream - the input stream to wrap
        encoding - the encoding to use
        Since:
        1.10
    • Method Detail

      • matches

        public static boolean matches​(byte[] signature,
                                      int length)
        Checks if the signature matches what is expected for a jar file (in this case it is the same as for a ZIP file).
        Parameters:
        signature - the bytes to check
        length - the number of bytes to check
        Returns:
        true, if this stream is a jar archive stream, false otherwise
      • getNextJarEntry

        @Deprecated
        public JarArchiveEntry getNextJarEntry()
                                        throws java.io.IOException
        Deprecated.
        Gets the next entry.
        Returns:
        the next entry.
        Throws:
        java.io.IOException - if an I/O error occurs.