|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.URLConnection
org.xwiki.classloader.internal.protocol.jar.JarURLConnection
public class JarURLConnection
URL Connection that knows how to get a JAR file with any custom protocol specified (in the form jar:<custom
protocol>://<path to jar file>!<path inside jar file>. Note that we don't extend the JDK's JarURLConnection since it
doesn't know how to use a custom URL Stream Handler Factory to handle custom protocols.
| Nested Class Summary | |
|---|---|
static interface |
JarURLConnection.JarOpener
Abstraction of JAR opener which allows to implement various caching policies. |
| Field Summary |
|---|
| Fields inherited from class java.net.URLConnection |
|---|
allowUserInteraction, doInput, doOutput, ifModifiedSince, url, useCaches |
| Constructor Summary | |
|---|---|
JarURLConnection(java.net.URL url,
JarURLConnection.JarOpener opener,
java.net.URLStreamHandlerFactory handlerFactory)
|
|
| Method Summary | |
|---|---|
void |
connect()
|
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. |
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. |
java.lang.String |
getEntryName()
Return the entry name for this connection. |
java.io.InputStream |
getInputStream()
|
java.util.jar.JarEntry |
getJarEntry()
|
java.util.jar.JarFile |
getJarFile()
|
java.net.URL |
getJarFileURL()
Returns the URL for the Jar file for this connection. |
java.util.jar.Attributes |
getMainAttributes()
Returns the main Attributes for the JAR file for this connection. |
java.util.jar.Manifest |
getManifest()
Returns the Manifest for this connection, or null if none. |
java.security.Permission |
getPermission()
|
| Methods inherited from class java.net.URLConnection |
|---|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JarURLConnection(java.net.URL url,
JarURLConnection.JarOpener opener,
java.net.URLStreamHandlerFactory handlerFactory)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void connect()
throws java.io.IOException
connect in class java.net.URLConnectionjava.io.IOException
public java.util.jar.JarFile getJarFile()
throws java.io.IOException
getJarFile in interface JarURLConnectionjava.io.IOException
public java.util.jar.JarEntry getJarEntry()
throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.URLConnectionjava.io.IOException
public java.security.Permission getPermission()
throws java.io.IOException
getPermission in class java.net.URLConnectionjava.io.IOExceptionpublic java.net.URL getJarFileURL()
public java.lang.String getEntryName()
public java.util.jar.Manifest getManifest()
throws java.io.IOException
java.io.IOException - if getting the JAR file for this connection causes an IOException to be trown.getJarFile()
public java.util.jar.Attributes getAttributes()
throws java.io.IOException
java.io.IOException - if getting the JAR entry causes an IOException to be thrown.getJarEntry()
public java.util.jar.Attributes getMainAttributes()
throws java.io.IOException
java.io.IOException - if getting the manifest causes an IOException to be thrown.getJarFile(),
getManifest()
public java.security.cert.Certificate[] getCertificates()
throws java.io.IOException
null
java.io.IOException - if getting the JAR entry causes an IOException to be thrown.getJarEntry()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||