| java.lang.Object | ||
| ↳ | java.net.URLConnection | |
| ↳ | java.net.JarURLConnection | |
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:
jar:http://www.example.com/applets/archive.jar!/jar:http://www.example.com/applets/archive.jar!/test.classjar:http://www.example.com/applets/archive.jar!/applets/| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| jarFileURLConnection | The location part of the represented URL. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.net.URLConnection
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an instance of
JarURLConnection that refers to the
specified URL.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns all attributes of the
JarEntry referenced by this JarURLConnection.
| |||||||||||
Returns all certificates of the
JarEntry referenced by this
JarURLConnection instance.
| |||||||||||
Gets the name of the entry referenced by this
JarURLConnection.
| |||||||||||
Gets the
JarEntry object of the entry referenced by this JarURLConnection.
| |||||||||||
Gets the
JarFile object referenced by this JarURLConnection.
| |||||||||||
Gets the URL to the JAR-file referenced by this
JarURLConnection.
| |||||||||||
Gets all attributes of the manifest file referenced by this
JarURLConnection.
| |||||||||||
Gets the manifest file associated with this JAR-URL.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.net.URLConnection
| |||||||||||
From class
java.lang.Object
| |||||||||||
The location part of the represented URL.
Constructs an instance of JarURLConnection that refers to the
specified URL.
| Parameters | |
|---|---|
url |
URL:
the URL that contains the location to connect to. |
| Throws | |
|---|---|
MalformedURLException |
if an invalid URL has been entered. |
Returns all attributes of the JarEntry referenced by this JarURLConnection.
| Returns | |
|---|---|
Attributes |
the attributes of the referenced JarEntry. |
| Throws | |
|---|---|
IOException |
if an I/O exception occurs while retrieving the JAR-entries. |
Returns all certificates of the JarEntry referenced by this
JarURLConnection instance. This method will return null
until the InputStream has been completely verified.
| Returns | |
|---|---|
Certificate[] |
the certificates of the JarEntry as an array. |
| Throws | |
|---|---|
IOException |
if there is an I/O exception occurs while getting the
JarEntry.
|
Gets the name of the entry referenced by this JarURLConnection.
The return value will be null if this instance refers to a JAR
file rather than an JAR file entry.
| Returns | |
|---|---|
String |
the JarEntry name this instance refers to.
|
Gets the JarEntry object of the entry referenced by this JarURLConnection.
| Returns | |
|---|---|
JarEntry |
the referenced JarEntry object or null if no
entry name is specified. |
| Throws | |
|---|---|
IOException |
if an error occurs while getting the file or file-entry. |
Gets the JarFile object referenced by this JarURLConnection.
| Returns | |
|---|---|
JarFile |
the referenced JarFile object. |
| Throws | |
|---|---|
IOException |
if an I/O exception occurs while retrieving the JAR-file. |
Gets the URL to the JAR-file referenced by this JarURLConnection.
| Returns | |
|---|---|
URL |
the URL to the JAR-file or null if there was an error
retrieving the URL.
|
Gets all attributes of the manifest file referenced by this JarURLConnection. If this instance refers to a JAR-file rather than a
JAR-file entry, null will be returned.
| Returns | |
|---|---|
Attributes |
the attributes of the manifest file or null. |
| Throws | |
|---|---|
IOException |
if an I/O exception occurs while retrieving the JarFile.
|
Gets the manifest file associated with this JAR-URL.
| Returns | |
|---|---|
Manifest |
the manifest of the referenced JAR-file. |
| Throws | |
|---|---|
IOException |
if an error occurs while getting the manifest file. |