Class JarManifestParser


  • public class JarManifestParser
    extends Object
    Utility that parses JAR manifest attributes.
    • Constructor Detail

      • JarManifestParser

        public JarManifestParser()
    • Method Detail

      • findFirstManifestAttribute

        public static Optional<String> findFirstManifestAttribute​(File jarFile,
                                                                  String... attributes)
                                                           throws IOException
        Returns the value of the first manifest attribute found in the provided JAR file.
        Parameters:
        jarFile - JAR file to parse
        attributes - Attributes to check
        Returns:
        Optional holding value of first found attribute
        Throws:
        IOException - If there is an error accessing the JAR