Jar URLs should be used to either refer to single JAR entries or
as base URLs, to refer to JAR files as codebases, or relative
URLs. The example above is a full JAR URL, which refers to a JAR
entry. If the entry name is omitted, the URL refers to the whole
Users should cast the generic URLConnection to a
JarURLConnection when they know that the URL they created is a JAR
URL, and they need JAR-specific functionality. For example:
URL url = new URL("jar:file:/home/duke/duke.jar!/");
JarURLConnection jarConnection = (JarURLConnection)url.openConnection();
Manifest manifest = jarConnection.getManifest();
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. The
returned object is not modifiable, and will throw
UnsupportedOperationException if the caller attempts to modify
the JAR entry object for this connection, or null if
the JAR URL for this connection points to a JAR file.
IOException - if getting the JAR file for this
connection causes an IOException to be trown.
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
the Certificate object for this connection if the URL
for it points to a JAR file entry, null otherwise.
IOException - if getting the JAR entry causes an
IOException to be thrown.
Submit a bug or feature Java, Java 2D, and JDBC are a trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.