API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.net. JarURLConnection View Source
Author(s)
Benjamin Renaud
Since
1.2
Version
Serial
Hierarchy
 Object
      URLConnection
          JarURLConnection
Implements
Subclasses
Description
publicabstract abstract class JarURLConnection
  A URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
Constructors
protected JarURLConnection (URL url) throws MalformedURLException
  Creates the new JarURLConnection to the specified URL.
Methods
Hide/Show inherited methods
public void addRequestProperty (String key, String value) [Inherited From URLConnection]
  Adds a general request property specified by a key-value pair.
publicabstract void connect () throws IOException [Inherited From URLConnection]
  Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
public boolean getAllowUserInteraction () [Inherited From URLConnection]
  Returns the value of the allowUserInteraction field for this object.
public Attributes getAttributes () throws IOException
  Return the Attributes object for this connection if the URL for it points to a JAR file entry, null otherwise.
public Certificate getCertificates () throws IOException
  Return the Certificate object for this connection if the URL for it points to a JAR file entry, null otherwise.
public int getConnectTimeout () [Inherited From URLConnection]
  Returns setting for connect timeout.
public Object getContent () throws IOException [Inherited From URLConnection]
  Retrieves the contents of this URL connection.
public Object getContent (Class classes) throws IOException [Inherited From URLConnection]
  Retrieves the contents of this URL connection.
public String getContentEncoding () [Inherited From URLConnection]
  Returns the value of the content-encoding header field.
pack-privatesynchronized ContentHandler getContentHandler () throws UnknownServiceException [Inherited From URLConnection]
  Gets the Content Handler appropriate for this connection.
public int getContentLength () [Inherited From URLConnection]
  Returns the value of the content-length header field.
public String getContentType () [Inherited From URLConnection]
  Returns the value of the content-type header field.
public long getDate () [Inherited From URLConnection]
  Returns the value of the date header field.
publicstatic boolean getDefaultAllowUserInteraction () [Inherited From URLConnection]
  Returns the default value of the allowUserInteraction field.
@Deprecated
publicstatic String getDefaultRequestProperty (String key) [Inherited From URLConnection]
  Returns the value of the default request property.
public boolean getDefaultUseCaches () [Inherited From URLConnection]
  Returns the default value of a URLConnection's useCaches flag.
public boolean getDoInput () [Inherited From URLConnection]
  Returns the value of this URLConnection's doInput flag.
public boolean getDoOutput () [Inherited From URLConnection]
  Returns the value of this URLConnection's doOutput flag.
public String getEntryName ()
  Return the entry name for this connection.
public long getExpiration () [Inherited From URLConnection]
  Returns the value of the expires header field.
publicstaticsynchronized FileNameMap getFileNameMap () [Inherited From URLConnection]
  Loads filename map (a mimetable) from a data file.
public String getHeaderField (int n) [Inherited From URLConnection]
  Returns the value for the nth header field.
public String getHeaderField (String name) [Inherited From URLConnection]
  Returns the value of the named header field.
public long getHeaderFieldDate (String name, long Default) [Inherited From URLConnection]
  Returns the value of the named field parsed as date.
public int getHeaderFieldInt (String name, int Default) [Inherited From URLConnection]
  Returns the value of the named field parsed as a number.
public String getHeaderFieldKey (int n) [Inherited From URLConnection]
  Returns the key for the nth header field.
public Map<String, List<String>> getHeaderFields () [Inherited From URLConnection]
  Returns an unmodifiable Map of the header fields.
public long getIfModifiedSince () [Inherited From URLConnection]
  Returns the value of this object's ifModifiedSince field.
public InputStream getInputStream () throws IOException [Inherited From URLConnection]
  Returns an input stream that reads from this open connection.
public JarEntry getJarEntry () throws IOException
  Return the JAR entry object for this connection, if any.
publicabstract JarFile getJarFile () throws IOException
  Return the JAR file for this connection.
public URL getJarFileURL ()
  Returns the URL for the Jar file for this connection.
public long getLastModified () [Inherited From URLConnection]
  Returns the value of the last-modified header field.
public Attributes getMainAttributes () throws IOException
  Returns the main Attributes for the JAR file for this connection.
public Manifest getManifest () throws IOException
  Returns the Manifest for this connection, or null if none.
public OutputStream getOutputStream () throws IOException [Inherited From URLConnection]
  Returns an output stream that writes to this connection.
public Permission getPermission () throws IOException [Inherited From URLConnection]
  Returns a permission object representing the permission necessary to make the connection represented by this object.
public int getReadTimeout () [Inherited From URLConnection]
  Returns setting for read timeout.
public Map<String, List<String>> getRequestProperties () [Inherited From URLConnection]
  Returns an unmodifiable Map of general request properties for this connection.
public String getRequestProperty (String key) [Inherited From URLConnection]
  Returns the value of the named general request property for this connection.
public URL getURL () [Inherited From URLConnection]
  Returns the value of this URLConnection's URL field.
public boolean getUseCaches () [Inherited From URLConnection]
  Returns the value of this URLConnection's useCaches field.
publicstatic String guessContentTypeFromName (String fname) [Inherited From URLConnection]
  Tries to determine the content type of an object, based on the specified "file" component of a URL.
publicstatic String guessContentTypeFromStream (InputStream is) throws IOException [Inherited From URLConnection]
  Tries to determine the type of an input stream based on the characters at the beginning of the input stream.
public void setAllowUserInteraction (boolean allowuserinteraction) [Inherited From URLConnection]
  Set the value of the allowUserInteraction field of this URLConnection.
public void setConnectTimeout (int timeout) [Inherited From URLConnection]
  Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced by this URLConnection.
publicstaticsynchronized void setContentHandlerFactory (ContentHandlerFactory fac) [Inherited From URLConnection]
  Sets the ContentHandlerFactory of an application.
publicstatic void setDefaultAllowUserInteraction (boolean defaultallowuserinteraction) [Inherited From URLConnection]
  Sets the default value of the allowUserInteraction field for all future URLConnection objects to the specified value.
@Deprecated
publicstatic void setDefaultRequestProperty (String key, String value) [Inherited From URLConnection]
  Sets the default value of a general request property.
public void setDefaultUseCaches (boolean defaultusecaches) [Inherited From URLConnection]
  Sets the default value of the useCaches field to the specified value.
public void setDoInput (boolean doinput) [Inherited From URLConnection]
  Sets the value of the doInput field for this URLConnection to the specified value.
public void setDoOutput (boolean dooutput) [Inherited From URLConnection]
  Sets the value of the doOutput field for this URLConnection to the specified value.
publicstatic void setFileNameMap (FileNameMap map) [Inherited From URLConnection]
  Sets the FileNameMap.
public void setIfModifiedSince (long ifmodifiedsince) [Inherited From URLConnection]
  Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
public void setReadTimeout (int timeout) [Inherited From URLConnection]
  Sets the read timeout to a specified timeout, in milliseconds.
public void setRequestProperty (String key, String value) [Inherited From URLConnection]
  Sets the general request property.
public void setUseCaches (boolean usecaches) [Inherited From URLConnection]
  Sets the value of the useCaches field of this URLConnection to the specified value.
public String toString () [Inherited From URLConnection]
  Returns a String representation of this URL connection.
Fields
Hide/Show inherited fields
protected boolean allowUserInteraction [Inherited From URLConnection]
  If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog.
protected boolean connected [Inherited From URLConnection]
  If false, this connection object has not created a communications link to the specified URL.
protected boolean doInput [Inherited From URLConnection]
  This variable is set by the setDoInput method.
protected boolean doOutput [Inherited From URLConnection]
  This variable is set by the setDoOutput method.
pack-privatestatic ContentHandlerFactory factory [Inherited From URLConnection]
The ContentHandler factory.
protected long ifModifiedSince [Inherited From URLConnection]
  Some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time.
protected URLConnection jarFileURLConnection
  The connection to the JAR file URL, if the connection has been initiated.
protected URL url [Inherited From URLConnection]
  The URL represents the remote object on the World Wide Web to which this connection is opened.
protected boolean useCaches [Inherited From URLConnection]
  If true, the protocol is allowed to use caching whenever it can.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar