加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090228154118/http://developer.android.com:80/reference/java/net/JarURLConnection.html
public abstract class

JarURLConnection

extends URLConnection
java.lang.Object
   ↳ java.net.URLConnection
     ↳ java.net.JarURLConnection

Class Overview

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.

Summary

Fields
protected URLConnection jarFileURLConnection
[Expand]
Inherited Fields
From class java.net.URLConnection
Protected Constructors
JarURLConnection(URL url)
Contructs an instance of JarURLConnection.
Public Methods
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
[Expand]
Inherited Methods
From class java.net.URLConnection
From class java.lang.Object

Fields

protected URLConnection jarFileURLConnection

Protected Constructors

protected JarURLConnection (URL url)

Contructs an instance of JarURLConnection.

Parameters
url java.net.URL the URL that contains the location to connect to

Public Methods

public Attributes getAttributes ()

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

public Certificate[] getCertificates ()

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.

public String getEntryName ()

Returns the JarEntry name of the entry referenced by this URLConnection.

Returns
  • java.lang.String the JarEntry name

public JarEntry getJarEntry ()

Returns the JarEntry of the entry referenced by this URLConnection.

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

public abstract JarFile getJarFile ()

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

public URL getJarFileURL ()

Returns the URL of the JarFile referenced by this URLConnection.

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

public Attributes getMainAttributes ()

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

public Manifest getManifest ()

Returns the Manifest associated with the Jar URL

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