|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader com.croftsoft.core.lang.classloader.CustomClassLoader com.croftsoft.core.lang.classloader.NetClassLoader
public class NetClassLoader
Upgrade this source code when the switch is made from Java 1.1 to Java 1.2.
References Scott Oaks, Java Security, O'Reilly, 1998.
Field Summary | |
---|---|
protected URL |
codebaseURL
|
Constructor Summary | |
---|---|
NetClassLoader(URL codebaseURL)
Ex: "http://www.mysticmayhem.com/lib/" |
Method Summary | |
---|---|
Image |
createImage(String imageName)
Creates the image by calling getResourceAsStream(imageName). |
URL |
getResource(String name)
|
InputStream |
getResourceAsStream(String name)
Loads a stream from the URL given by getResource(name). |
static void |
invokeMain(Class c,
String[] args)
|
static void |
launchMain(String codebaseURLName,
String mainClassName,
String[] args)
Loads a remote class and launches its main() method. |
protected byte[] |
loadClassData(String name)
Implement to load the raw bytecode from an external source. |
static void |
main(String[] args)
Loads a remote class and launches its main() method. |
Methods inherited from class com.croftsoft.core.lang.classloader.CustomClassLoader |
---|
loadClass, parsePackageName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected URL codebaseURL
Constructor Detail |
---|
public NetClassLoader(URL codebaseURL)
Method Detail |
---|
public static void main(String[] args) throws Exception
Command-line
- arguments:
Exception
public static void launchMain(String codebaseURLName, String mainClassName, String[] args) throws ClassNotFoundException, IllegalAccessException, MalformedURLException
ClassNotFoundException
IllegalAccessException
MalformedURLException
public static void invokeMain(Class c, String[] args) throws IllegalAccessException
IllegalAccessException
protected byte[] loadClassData(String name)
CustomClassLoader
loadClassData
in class CustomClassLoader
public URL getResource(String name)
getResource
in class ClassLoader
public InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
public Image createImage(String imageName) throws IOException
IOException
|
CroftSoft Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |