All Packages This Package Class Hierarchy Class Search Index
Class calypso.util.URLClassLoader
java.lang.Object | +----java.lang.ClassLoader | +----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; }
Fields
classes
private Hashtable classes
codeBaseURL
private URL codeBaseURL
archiveURL
private URL archiveURL
fZipFile
private ZipFile fZipFile
fTempFile
private TempFile fTempFile
XXXnoisy
static final boolean XXXnoisy
Constructors
URLClassLoader
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).
Methods
loadClass
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.
loadClassFromArchive
private Class loadClassFromArchive(String name, URL url, String pathname) throws IOException
loadClass
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.
- Overrides:
- loadClass in class ClassLoader
loadClass
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).
- Overrides:
- loadClass in class ClassLoader
findClass
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.
readURL
private byte[] readURL(URL url) throws IOException
readZipFile
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.
copyURL
private void copyURL(OutputStream aOut, URL aURLSource) throws IOException
getCodeBaseURL
public URL getCodeBaseURL()
finalize
protected void finalize()
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4