Class JarHandler

    • Constructor Detail

      • JarHandler

        public JarHandler()
    • Method Detail

      • openConnection

        protected URLConnection openConnection​(URL u)
                                        throws IOException
        Returns a connection to the jar file pointed by this URL in the file system
        Specified by:
        openConnection in class URLStreamHandler
        Parameters:
        u - java.net.URL The URL to which the connection is pointing to
        Returns:
        java.net.URLConnection A connection to the resource pointed by this url.
        Throws:
        IOException - thrown if an IO error occurs when this method tries to establish connection.
      • parseURL

        protected void parseURL​(URL url,
                                String spec,
                                int start,
                                int limit)
        Description copied from class: URLStreamHandler
        Parses the clear text URL in str into a URL object. URL strings generally have the following format:

        http://www.company.com/java/file1.java#reference

        The string is parsed in HTTP format. If the protocol has a different URL format this method must be overridden.

        Overrides:
        parseURL in class URLStreamHandler
        Parameters:
        url - URL the context URL
        spec - java.lang.String the spec string
        start - int the location to start parsing from
        limit - int the location where parsing ends
        See Also:
        URLStreamHandler.toExternalForm(java.net.URL), URL