Methods Summary |
---|
public java.util.jar.Attributes | getAttributes()Returns all attributes of the {@code JarEntry} referenced by this {@code
JarURLConnection}.
JarEntry jEntry = getJarEntry();
return (jEntry == null) ? null : jEntry.getAttributes();
|
public java.security.cert.Certificate[] | getCertificates()Returns all certificates of the {@code JarEntry} referenced by this
{@code JarURLConnection} instance. This method will return {@code null}
until the {@code InputStream} has been completely verified.
JarEntry jEntry = getJarEntry();
if (jEntry == null) {
return null;
}
return jEntry.getCertificates();
|
public java.lang.String | getEntryName()Gets the name of the entry referenced by this {@code JarURLConnection}.
The return value will be {@code null} if this instance refers to a JAR
file rather than an JAR file entry.
return entryName;
|
public java.util.jar.JarEntry | getJarEntry()Gets the {@code JarEntry} object of the entry referenced by this {@code
JarURLConnection}.
if (!connected) {
connect();
}
if (entryName == null) {
return null;
}
// The entry must exist since the connect succeeded
return getJarFile().getJarEntry(entryName);
|
public abstract java.util.jar.JarFile | getJarFile()Gets the {@code JarFile} object referenced by this {@code
JarURLConnection}.
|
public java.net.URL | getJarFileURL()Gets the URL to the JAR-file referenced by this {@code JarURLConnection}.
if (fileURL != null) {
return fileURL;
}
try {
return fileURL = new URL(url.getFile().substring(0,
url.getFile().indexOf("!/"))); //$NON-NLS-1$
} catch (MalformedURLException e) {
return null;
}
|
public java.util.jar.Attributes | getMainAttributes()Gets all attributes of the manifest file referenced by this {@code
JarURLConnection}. If this instance refers to a JAR-file rather than a
JAR-file entry, {@code null} will be returned.
Manifest m = getJarFile().getManifest();
return (m == null) ? null : m.getMainAttributes();
|
public java.util.jar.Manifest | getManifest()Gets the manifest file associated with this JAR-URL.
return getJarFile().getManifest();
|