Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.emory.mathcs.util.classloader.jar
Class JarURLConnection

    java.lang.Object
      java.net.URLConnection
          java.net.JarURLConnection
              edu.emory.mathcs.util.classloader.jar.JarURLConnection

public class JarURLConnection
extends java.net.JarURLConnection

Alternative implementation of `JarURLConnection` which supports customizable JAR caching policies. It addresses bugs 4405789, 4388666, 4639900 in Java Bug Parade. SUN recommends to disable caches completely as a workaround for those bugs; however, this may significantly affect performance in case of resources downloaded from the network. This class is a part of the solution that allows to tailor the caching policy according to the program needs, with cache-per-classloader default policy.

Version:
  1.0
Author:
  Dawid Kurzyniec
See Also:
  `JarURLStreamHandler`

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.JarURLConnection
`jarFileURLConnection`

Fields inherited from class java.net.URLConnection
`allowUserInteraction, doInput, doOutput, ifModifiedSince, url, useCaches`

Constructor Summary
`JarURLConnection(java.net.URL url, JarURLConnection.JarOpener opener)` Creates JarURLConnection for a given URL, using specified JAR opener.

Method Summary
`void` | `connect()`
`java.io.InputStream` | `getInputStream()`
`java.util.jar.JarEntry` | `getJarEntry()`
`java.util.jar.JarFile` | `getJarFile()`
`java.security.Permission` | `getPermission()`

Methods inherited from class java.net.JarURLConnection
`getAttributes, getCertificates, getEntryName, getJarFileURL, getMainAttributes, getManifest`

Methods inherited from class java.net.URLConnection
`addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JarURLConnection

    public JarURLConnection(java.net.URL url,
                            JarURLConnection.JarOpener opener)
                     throws java.io.IOException

  Creates JarURLConnection for a given URL, using specified JAR opener.

Parameters:
  `url` - the URL to open connection to
  `opener` - the JAR opener to use
Throws:
  `java.io.IOException`

Method Detail

### connect

    public void connect()
                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### getJarFile

    public java.util.jar.JarFile getJarFile()
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### getJarEntry

    public java.util.jar.JarEntry getJarEntry()
                                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getPermission

    public java.security.Permission getPermission()
                                           throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD