Build 1.0_r1(from source)

java.net
Class JarURLConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by java.net.JarURLConnection

public abstract class JarURLConnection
extends URLConnection

This class establishes a connection to a URL using the jar protocol. Jar URLs are specified as follows:

jar:!/{entry}
where "!/" is called a seperator.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.URLConnection
URLConnection.DefaultContentHandler
 
Field Summary
protected  URLConnection jarFileURLConnection
           
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, contentHandlers, defaultHandler, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected JarURLConnection(URL url)
          Contructs an instance of JarURLConnection.
 
Method Summary
 Attributes getAttributes()
          Returns the attributes of the JarEntry referenced by this JarURLConnection.
 Certificate[] getCertificates()
          Returns the Certificates of the JarEntry referenced by this URLConnection.
 String getEntryName()
          Returns the JarEntry name of the entry referenced by this URLConnection.
 JarEntry getJarEntry()
          Returns the JarEntry of the entry referenced by this URLConnection.
abstract  JarFile getJarFile()
          Returns the the JarFile referenced by this URLConnection.
 URL getJarFileURL()
          Returns the URL of the JarFile referenced by this URLConnection.
 Attributes getMainAttributes()
          Returns the main Attributes of the JarFile referenced by this URLConnection.
 Manifest getManifest()
          Returns the Manifest associated with the Jar URL
 
Methods inherited from class java.net.URLConnection
addRequestProperty, connect, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, 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
 

Field Detail

jarFileURLConnection

protected URLConnection jarFileURLConnection
Constructor Detail

JarURLConnection

protected JarURLConnection(URL url)
                    throws MalformedURLException
Contructs an instance of JarURLConnection.

Parameters:
url - java.net.URL the URL that contains the location to connect to
Throws:
MalformedURLException
Method Detail

getAttributes

public Attributes getAttributes()
                         throws IOException
Returns the attributes of the JarEntry referenced by this JarURLConnection.

Returns:
java.util.jar.Attributes the attributes of the the JarEntry
Throws:
IOException - thrown if an IO exception occurs while retrieving the JarEntry

getCertificates

public Certificate[] getCertificates()
                              throws IOException
Returns the Certificates of the JarEntry referenced by this URLConnection. This method will return null until the InputStream has been completely verified

Returns:
Certificate[] the Certificates of the JarEntry.
Throws:
IOException - thrown if there is an IO exception occurs while getting the JarEntry.

getEntryName

public String getEntryName()
Returns the JarEntry name of the entry referenced by this URLConnection.

Returns:
java.lang.String the JarEntry name

getJarEntry

public JarEntry getJarEntry()
                     throws IOException
Returns the JarEntry of the entry referenced by this URLConnection.

Returns:
java.util.jar.JarEntry the JarEntry referenced
Throws:
IOException

getManifest

public Manifest getManifest()
                     throws IOException
Returns the Manifest associated with the Jar URL

Returns:
java.util.jar.Manifest The JarFile's Manifest
Throws:
IOException

getJarFile

public abstract JarFile getJarFile()
                            throws IOException
Returns the the JarFile referenced by this URLConnection.

Returns:
java.util.jar.JarFile the JarFile
Throws:
IOException - thrown if an IO exception occurs while retrieving the Jar file

getJarFileURL

public URL getJarFileURL()
Returns the URL of the JarFile referenced by this URLConnection.

Returns:
java.net.URL the URL of the JarFile.

getMainAttributes

public Attributes getMainAttributes()
                             throws IOException
Returns the main Attributes of the JarFile referenced by this URLConnection.

Returns:
java.util.jar.Attributes the Attributes of the the JarFile
Throws:
IOException - thrown if an IO exception occurs while retrieving the JarFile

Build 1.0_r1(from source)

Please submit a feedback, bug or feature