com.ibm.security12.sun.net.www.protocol.jar
Class JarURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--com.ibm.security12.java.net.JarURLConnection
              |
              +--com.ibm.security12.sun.net.www.protocol.jar.JarURLConnection

public class JarURLConnection
extends JarURLConnection

Since:
JDK1.2
Author:
Benjamin Renaud

Fields inherited from class com.ibm.security12.java.net.JarURLConnection
jarFileURLConnection
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
JarURLConnection(URL url, Handler handler)
           
 
Method Summary
 void connect()
           
 boolean getAllowUserInteraction()
          Returns the value of the allowUserInteraction field for this object.
 Object getContent()
           
 int getContentLength()
           
 String getContentType()
           
 boolean getDefaultUseCaches()
          Returns the default value of a URLConnection's useCaches flag.
 String getHeaderField(String name)
           
 InputStream getInputStream()
           
 JarEntry getJarEntry()
           
 JarFile getJarFile()
           
 Permission getPermission()
           
 String getRequestProperty(String key)
          Returns the value of the named general request property for this connection.
 boolean getUseCaches()
          Returns the value of this URLConnection's useCaches field.
 void setAllowUserInteraction(boolean allowuserinteraction)
          Set the value of the allowUserInteraction field of this URLConnection.
 void setDefaultUseCaches(boolean defaultusecaches)
          Sets the default value of the useCaches field to the specified value.
 void setIfModifiedSince(long ifmodifiedsince)
          Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
 void setRequestProperty(String key, String value)
          Sets the general request property.
 void setUseCaches(boolean usecaches)
          Sets the value of the useCaches field of this URLConnection to the specified value.
 
Methods inherited from class com.ibm.security12.java.net.JarURLConnection
getAttributes, getCertificates, getEntryName, getJarFileURL, getMainAttributes, getManifest
 
Methods inherited from class java.net.URLConnection
getContentEncoding, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getIfModifiedSince, getLastModified, getOutputStream, getURL, guessContentTypeFromName, guessContentTypeFromStream, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDoInput, setDoOutput, setFileNameMap, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JarURLConnection

public JarURLConnection(URL url,
                        Handler handler)
                 throws MalformedURLException,
                        IOException
Method Detail

getJarFile

public JarFile getJarFile()
                   throws IOException
Overrides:
getJarFile in class JarURLConnection

getJarEntry

public JarEntry getJarEntry()
                     throws IOException
Overrides:
getJarEntry in class JarURLConnection

getPermission

public Permission getPermission()
                         throws IOException
Overrides:
getPermission in class URLConnection

connect

public void connect()
             throws IOException
Overrides:
connect in class URLConnection

getInputStream

public InputStream getInputStream()
                           throws IOException
Overrides:
getInputStream in class URLConnection

getContentLength

public int getContentLength()
Overrides:
getContentLength in class URLConnection

getContent

public Object getContent()
                  throws IOException
Overrides:
getContent in class URLConnection

getContentType

public String getContentType()
Overrides:
getContentType in class URLConnection

getHeaderField

public String getHeaderField(String name)
Overrides:
getHeaderField in class URLConnection

setRequestProperty

public void setRequestProperty(String key,
                               String value)
Sets the general request property.
Parameters:
key - the keyword by which the request is known (e.g., "accept").
value - the value associated with it.
Overrides:
setRequestProperty in class URLConnection

getRequestProperty

public String getRequestProperty(String key)
Returns the value of the named general request property for this connection.
Returns:
the value of the named general request property for this connection.
Overrides:
getRequestProperty in class URLConnection

setAllowUserInteraction

public void setAllowUserInteraction(boolean allowuserinteraction)
Set the value of the allowUserInteraction field of this URLConnection.
Parameters:
allowuserinteraction - the new value.
Overrides:
setAllowUserInteraction in class URLConnection
See Also:
URLConnection.allowUserInteraction

getAllowUserInteraction

public boolean getAllowUserInteraction()
Returns the value of the allowUserInteraction field for this object.
Returns:
the value of the allowUserInteraction field for this object.
Overrides:
getAllowUserInteraction in class URLConnection
See Also:
URLConnection.allowUserInteraction

setUseCaches

public void setUseCaches(boolean usecaches)
Sets the value of the useCaches field of this URLConnection to the specified value.

Some protocols do caching of documents. Occasionally, it is important to be able to "tunnel through" and ignore the caches (e.g., the "reload" button in a browser). If the UseCaches flag on a connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value comes from DefaultUseCaches, which defaults to true.

Overrides:
setUseCaches in class URLConnection
See Also:
URLConnection.useCaches

getUseCaches

public boolean getUseCaches()
Returns the value of this URLConnection's useCaches field.
Returns:
the value of this URLConnection's useCaches field.
Overrides:
getUseCaches in class URLConnection
See Also:
URLConnection.useCaches

setIfModifiedSince

public void setIfModifiedSince(long ifmodifiedsince)
Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
Parameters:
value - the new value.
Overrides:
setIfModifiedSince in class URLConnection
See Also:
URLConnection.ifModifiedSince

setDefaultUseCaches

public void setDefaultUseCaches(boolean defaultusecaches)
Sets the default value of the useCaches field to the specified value.
Parameters:
defaultusecaches - the new value.
Overrides:
setDefaultUseCaches in class URLConnection
See Also:
URLConnection.useCaches

getDefaultUseCaches

public boolean getDefaultUseCaches()
Returns the default value of a URLConnection's useCaches flag.

Ths default is "sticky", being a part of the static state of all URLConnections. This flag applies to the next, and all following URLConnections that are created.

Returns:
the default value of a URLConnection's useCaches flag.
Overrides:
getDefaultUseCaches in class URLConnection
See Also:
URLConnection.useCaches