Save This Page
Home » openjdk-7 » sun.net.www.protocol » jar » [javadoc | source]
sun.net.www.protocol.jar
public class: JarURLConnection [javadoc | source]
java.lang.Object
   java.net.URLConnection
      java.net.JarURLConnection
         sun.net.www.protocol.jar.JarURLConnection
Nested Class Summary:
class  JarURLConnection.JarURLInputStream   
Constructor:
 public JarURLConnection(URL url,
    Handler handler) throws MalformedURLException, IOException 
Method from sun.net.www.protocol.jar.JarURLConnection Summary:
addRequestProperty,   connect,   getAllowUserInteraction,   getContent,   getContentLength,   getContentLengthLong,   getContentType,   getDefaultUseCaches,   getHeaderField,   getInputStream,   getJarEntry,   getJarFile,   getPermission,   getRequestProperties,   getRequestProperty,   getUseCaches,   setAllowUserInteraction,   setDefaultUseCaches,   setIfModifiedSince,   setRequestProperty,   setUseCaches
Methods from java.net.JarURLConnection:
getAttributes,   getCertificates,   getEntryName,   getJarEntry,   getJarFile,   getJarFileURL,   getMainAttributes,   getManifest
Methods from 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 from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.net.www.protocol.jar.JarURLConnection Detail:
 public  void addRequestProperty(String key,
    String value) 
    Adds a general request property specified by a key-value pair. This method will not overwrite existing values associated with the same key.
 public  void connect() throws IOException 
 public boolean getAllowUserInteraction() 
    Returns the value of the allowUserInteraction field for this object.
 public Object getContent() throws IOException 
 public int getContentLength() 
 public long getContentLengthLong() 
 public String getContentType() 
 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.

 public String getHeaderField(String name) 
 public InputStream getInputStream() throws IOException 
 public JarEntry getJarEntry() throws IOException 
 public JarFile getJarFile() throws IOException 
 public Permission getPermission() throws IOException 
 public Map getRequestProperties() 
    Returns an unmodifiable Map of general request properties for this connection. The Map keys are Strings that represent the request-header field names. Each Map value is a unmodifiable List of Strings that represents the corresponding field values.
 public String getRequestProperty(String key) 
    Returns the value of the named general request property for this connection.
 public boolean getUseCaches() 
    Returns the value of this URLConnection's useCaches field.
 public  void setAllowUserInteraction(boolean allowuserinteraction) 
    Set the value of the allowUserInteraction field of this URLConnection.
 public  void setDefaultUseCaches(boolean defaultusecaches) 
    Sets the default value of the useCaches field to the specified value.
 public  void setIfModifiedSince(long ifmodifiedsince) 
    Sets the value of the ifModifiedSince field of this URLConnection to the specified value.
 public  void setRequestProperty(String key,
    String value) 
    Sets the general request property.
 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.