Methods Summary |
---|
public java.util.jar.Attributes | getAttributes()Return the Attributes object for this connection if the URL
for it points to a JAR file entry, null otherwise.
JarEntry e = getJarEntry();
return e != null ? e.getAttributes() : null;
|
public java.security.cert.Certificate[] | getCertificates()Return the Certificate object for this connection if the URL
for it points to a JAR file entry, null otherwise. This method
can only be called once
the connection has been completely verified by reading
from the input stream until the end of the stream has been
reached. Otherwise, this method will return null
JarEntry e = getJarEntry();
return e != null ? e.getCertificates() : null;
|
public java.lang.String | getEntryName()Return the entry name for this connection. This method
returns null if the JAR file URL corresponding to this
connection points to a JAR file and not a JAR file entry.
return entryName;
|
public java.util.jar.JarEntry | getJarEntry()Return the JAR entry object for this connection, if any. This
method returns null if the JAR file URL corresponding to this
connection points to a JAR file and not a JAR file entry.
return getJarFile().getJarEntry(entryName);
|
public abstract java.util.jar.JarFile | getJarFile()Return the JAR file for this connection.
|
public java.net.URL | getJarFileURL()Returns the URL for the Jar file for this connection.
return jarFileURL;
|
public java.util.jar.Attributes | getMainAttributes()Returns the main Attributes for the JAR file for this
connection.
Manifest man = getManifest();
return man != null ? man.getMainAttributes() : null;
|
public java.util.jar.Manifest | getManifest()Returns the Manifest for this connection, or null if none.
return getJarFile().getManifest();
|
private void | parseSpecs(java.net.URL url)
String spec = url.getFile();
int separator = spec.indexOf("!/");
/*
* REMIND: we don't handle nested JAR URLs
*/
if (separator == -1) {
throw new MalformedURLException("no !/ found in url spec:" + spec);
}
jarFileURL = new URL(spec.substring(0, separator++));
entryName = null;
/* if ! is the last letter of the innerURL, entryName is null */
if (++separator != spec.length()) {
entryName = spec.substring(separator, spec.length());
entryName = ParseUtil.decode (entryName);
}
|