remoteLaunch
Class ProgramLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--remoteLaunch.ProgramLoader

public class ProgramLoader
extends java.lang.ClassLoader

The class ProgramLoader load remote class.

Version:
1.0 date : 15/07/2001
key-word
RMI
Author:
Pellier Damien
See Also:
ProgramLoader

Inner classes inherited from class java.lang.ClassLoader
java.lang.ClassLoader.NativeLibrary
 
Field Summary
private  java.lang.String basedir
          The base directory for loading local classes
(package private)  java.util.Hashtable cache
          The cache for name binding
private  boolean url
          Indicate if the first argument is a file or a url
 
Fields inherited from class java.lang.ClassLoader
bootstrapClassPath, classes, defaultDomain, defaultPermissions, domains, getClassLoaderPerm, initialized, loadedLibraryNames, nativeLibraries, nativeLibraryContext, nocerts, package2certs, packages, parent, scl, sclSet, sys_paths, systemNativeLibraries, usr_paths
 
Constructor Summary
ProgramLoader(java.lang.String dir)
          Constructor of class ProgramLoader
 
Method Summary
 java.lang.Class loadClass(java.lang.String name)
          The main entry point of the class which allows class names to be bound and classes to be loaded if needed.
private  byte[] loadClassDataFromFile(java.lang.String name)
          read a class from a local file.
private  byte[] loadClassDataFromURL(java.lang.String name)
          read a class from a web server.
private  int read(java.io.InputStream ds, byte[] zone)
          read an input strean until the end
 
Methods inherited from class java.lang.ClassLoader
, addClass, check, checkCerts, checkPackageAccess, compareCerts, defineClass, defineClass, defineClass, defineClass0, definePackage, findBootstrapClass, findBootstrapClass0, findClass, findLibrary, findLoadedClass, findNative, findResource, findResources, findSystemClass, getBootstrapClassPath, getBootstrapResource, getBootstrapResources, getCallerClassLoader, getDefaultDomain, getGetClassLoaderPerm, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, initializePath, isAncestor, loadClass, loadClassInternal, loadLibrary, loadLibrary0, resolveClass, resolveClass0, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

basedir

private java.lang.String basedir
The base directory for loading local classes

cache

java.util.Hashtable cache
The cache for name binding

url

private boolean url
Indicate if the first argument is a file or a url
Constructor Detail

ProgramLoader

public ProgramLoader(java.lang.String dir)
Constructor of class ProgramLoader
Parameters:
dir - the path where find classes
Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String name)
The main entry point of the class which allows class names to be bound and classes to be loaded if needed.
Overrides:
loadClass in class java.lang.ClassLoader
Parameters:
name - the name of the class to find

loadClassDataFromFile

private byte[] loadClassDataFromFile(java.lang.String name)
read a class from a local file.
Parameters:
name - the name of the class to read

loadClassDataFromURL

private byte[] loadClassDataFromURL(java.lang.String name)
read a class from a web server. Sorry, I can't do better if you look the source code !!! I can't get the size of the remote file before I read it ...
Parameters:
name - the name of the class to read

read

private int read(java.io.InputStream ds,
                 byte[] zone)
          throws java.io.IOException
read an input strean until the end
Parameters:
ds - the InputStream where read
zone - a byte[] where put the result

Copyright 1885-2001 FIRMENICH SA, Geneva

Submit a bug or feature
Copyright 1885-2001 FIRMENICH SA, Geneva,
All Rights Reserved.