You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

All Packages  This Package  Class Hierarchy  Class Search  Index

Class calypso.util.URLClassLoader


A URL based class loader. This class knows how to load classes from a given base URL

public class  URLClassLoader
     extends java.lang.ClassLoader
          // Fields 6
     static final boolean XXXnoisy;
     private URL archiveURL;
     private Hashtable classes;
     private URL codeBaseURL;
     private TempFile fTempFile;
     private ZipFile fZipFile;

          // Constructors 1
     public URLClassLoader(URL, URL);

          // Methods 10
     private void copyURL(OutputStream, URL) throws IOException;
     protected void finalize();
     private synchronized Class findClass(String) throws ClassNotFoundException;
     public URL getCodeBaseURL();
     public Class loadClass(String) throws ClassNotFoundException;
     protected Class loadClass(String, boolean) throws ClassNotFoundException;
     private Class loadClass(String, URL, String) throws IOException;
     private Class loadClassFromArchive(String, URL, String) throws IOException;
     private byte[] readURL(URL) throws IOException;
     private byte[] readZipFile(String) throws IOException;



   private Hashtable classes


   private URL codeBaseURL


   private URL archiveURL


   private ZipFile fZipFile


   private TempFile fTempFile


   static final boolean XXXnoisy



   public URLClassLoader(URL aBaseURL, 
                         URL aArchiveURL) 

Create a new URL based class loader. aBaseURL specifies the URL to load classes relative to. If aArchiveURL is not null then the archive will be searched first (if it fails then the load will be attempted from aBaseURL).



   private Class loadClass(String name, 
                           URL url, 
                           String pathname)  throws IOException

Load a class from a URL. This does the actual work of loading the class and then defining it.


   private Class loadClassFromArchive(String name, 
                                      URL url, 
                                      String pathname)  throws IOException


   public Class loadClass(String name)  throws ClassNotFoundException

Load a class from this class loader. This method is used by applets that want to explicitly load a class.

loadClass in class ClassLoader


   protected Class loadClass(String name, 
                             boolean resolve)  throws ClassNotFoundException

Load and resolve a class. This method is called by the java runtime to get a class that another class needs (e.g. a superclass).

loadClass in class ClassLoader


   private synchronized Class findClass(String name)  throws ClassNotFoundException

This method finds a class. The returned class may be unresolved. This method has to be synchronized to avoid two threads loading the same class at the same time. Must be called with the actual class name.


   private byte[] readURL(URL url)  throws IOException


   private byte[] readZipFile(String aName)  throws IOException

Load a given file from the underlying zip file named "aName". Return an array of bytes which contain the decompressed contents of the file in the zip file.


   private void copyURL(OutputStream aOut, 
                        URL aURLSource)  throws IOException


   public URL getCodeBaseURL() 


   protected void finalize() 
finalize in class Object

All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4