JarURLConnection

public abstract class JarURLConnection extends URLConnection

This class establishes a connection to a jar: URL using the JAR protocol. A JarURLConnection instance can refer to either a JAR archive file or to an entry of such a file. jar: URLs are specified as follows: jar:{archive-url}!/{entry} where "!/" is called a separator. This separator is important to determine if an archive or an entry of an archive is referred.

Examples:

  • Archive: jar:http://www.example.com/applets/archive.jar!/
  • File Entry: jar:http://www.example.com/applets/archive.jar!/test.class
  • Directory Entry: jar:http://www.example.com/applets/archive.jar!/applets/
  • Field Summary

    protected URLConnection jarFileURLConnection The location part of the represented URL.

    Inherited Field Summary

    Protected Constructor Summary

    JarURLConnection(URL url)
    Constructs an instance of JarURLConnection that refers to the specified URL.

    Public Method Summary

    Attributes
    getAttributes()
    Returns all attributes of the JarEntry referenced by this JarURLConnection.
    Certificate[]
    getCertificates()
    Returns all certificates of the JarEntry referenced by this JarURLConnection instance.
    String
    getEntryName()
    Gets the name of the entry referenced by this JarURLConnection.
    JarEntry
    getJarEntry()
    Gets the JarEntry object of the entry referenced by this JarURLConnection.
    abstract JarFile
    getJarFile()
    Gets the JarFile object referenced by this JarURLConnection.
    URL
    getJarFileURL()
    Gets the URL to the JAR-file referenced by this JarURLConnection.
    Attributes
    getMainAttributes()
    Gets all attributes of the manifest file referenced by this JarURLConnection.
    Manifest
    getManifest()
    Gets the manifest file associated with this JAR-URL.

    Inherited Method Summary