Class DefaultWarArchive

    • Constructor Detail

      • DefaultWarArchive

        public DefaultWarArchive​(InputStream inputStream)
                          throws IOException
        Constructor.
        Parameters:
        inputStream - The input stream for the web application archive
        Throws:
        IOException - If there was a problem reading the WAR
    • Method Detail

      • getWebXml

        public WebXml getWebXml()
                         throws IOException,
                                org.jdom2.JDOMException
        Returns the deployment descriptor of the web application.
        Specified by:
        getWebXml in interface WarArchive
        Returns:
        The parsed deployment descriptor
        Throws:
        IOException - If there was a problem reading the deployment descriptor in the WAR
        org.jdom2.JDOMException - If the deployment descriptor of the WAR could not be parsed
      • store

        public void store​(File warFile)
                   throws IOException,
                          org.jdom2.JDOMException
        Stores the war archive to file. Changes to the descriptors of the war archive will be stored as well.
        Specified by:
        store in interface WarArchive
        Parameters:
        warFile - file to store the war in.
        Throws:
        IOException - If there was a problem reading the deployment descriptor in the WAR
        org.jdom2.JDOMException - If the deployment descriptor of the WAR could not be parsed
      • containsClass

        public boolean containsClass​(String className)
                              throws IOException
        Returns whether a class of the specified name is contained in the web-app archive, either directly in WEB-INF/classes, or in one of the JARs in WEB-INF/lib.
        Specified by:
        containsClass in interface JarArchive
        Overrides:
        containsClass in class DefaultJarArchive
        Parameters:
        className - The name of the class to search for
        Returns:
        Whether the class was found in the archive
        Throws:
        IOException - If an I/O error occurred reading the archive