org.sapia.clazzy
Class ClazzyURLConnection

java.lang.Object
  |
  +--java.net.URLConnection
        |
        +--org.sapia.clazzy.ClazzyURLConnection

public class ClazzyURLConnection
extends URLConnection

An instance of this class deals with "clazzy" URLs, of the form:

 clazzy:path_to_jar?file_name.
 

An instance of this class in fact interacts with a JarClassLoader to retrieve resources corresponding to the given URLs (respecting the above format).

In order for the URLs handled by this class to work properly, the following system property must be set:

 -Djava.protocol.handler.pkgs=org.sapia
 

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
ClazzyURLStreamHandlerFactory, JarLoader, JarClassLoader

Field Summary
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
ClazzyURLConnection(URL url)
           
 
Method Summary
 void connect()
           
 boolean getAllowUserInteraction()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClazzyURLConnection

public ClazzyURLConnection(URL url)
Method Detail

connect

public void connect()
             throws IOException
Specified by:
connect in class URLConnection
IOException
See Also:
URLConnection.connect()

getInputStream

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

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Overrides:
getOutputStream in class URLConnection
IOException
See Also:
URLConnection.getOutputStream()

getAllowUserInteraction

public boolean getAllowUserInteraction()
Overrides:
getAllowUserInteraction in class URLConnection
See Also:
URLConnection.getAllowUserInteraction()


Copyright © 2002 Sapia Open Community, Inc. All Rights Reserved.