java.lang.Object
java.net.URLConnection
java.net.JarURLConnection
gnu.java.net.protocol.jar.Connection
- public final class Connection
- extends java.net.JarURLConnection
This subclass of java.net.JarURLConnection models a URLConnection via
the "jar" protocol.
| Methods inherited from class java.net.URLConnection |
addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getOutputStream, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString |
dateFormat
private static java.text.SimpleDateFormat dateFormat
- HTTP-style DateFormat, used to format the last-modified header.
Lazy initialized since jar files are used during bootstrapping.
jar_file
private java.util.jar.JarFile jar_file
jar_entry
private java.util.jar.JarEntry jar_entry
jar_url
private java.net.URL jar_url
Connection
protected Connection(java.net.URL url)
throws java.net.MalformedURLException
connect
public void connect()
throws java.io.IOException
- Description copied from class:
java.net.URLConnection
- Establishes the actual connection to the URL associated with this
connection object
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Description copied from class:
java.net.URLConnection
- Returns an InputStream for this connection. As this default
implementation returns null, subclasses should override this method
getJarFile
public java.util.jar.JarFile getJarFile()
throws java.io.IOException
- Description copied from class:
java.net.JarURLConnection
- Returns a read-only JarFile object for the remote jar file
getHeaderField
public java.lang.String getHeaderField(java.lang.String field)
- Description copied from class:
java.net.URLConnection
- Returns a String representing the value of the header field having
the named key. Returns null if the header field does not exist.
getContentLength
public int getContentLength()
- Description copied from class:
java.net.URLConnection
- Returns the value of the content-length header field or -1 if the value
is not known or not present.
getLastModified
public long getLastModified()
- Description copied from class:
java.net.URLConnection
- Returns the value of the last-modified header field or 0 if not known known
or not present. If populated, the return value is the number of seconds
since midnight on 1/1/1970.