类 ArchiveHelper


  • public class ArchiveHelper
    extends Object
    Helper for dealing with archives
    作者:
    Emmanuel Bernard, Steve Ebersole
    • 方法详细资料

      • getJarURLFromURLEntry

        public static URL getJarURLFromURLEntry​(URL url,
                                                String entry)
                                         throws IllegalArgumentException
        Get the JAR URL of the JAR containing the given entry Method used in a non managed environment
        参数:
        url - URL pointing to the known file in the JAR
        entry - file known to be in the JAR
        返回:
        the JAR URL
        抛出:
        IllegalArgumentException - if none URL is found
      • getURLFromPath

        public static URL getURLFromPath​(String jarPath)
        get the URL from a given path string
        参数:
        jarPath - The path that represents a URL
        返回:
        The resolved URL reference
        抛出:
        IllegalArgumentException - if something goes wrong