DCT Lightfoot v3 API specification

com.dctl.j2me.system
Class JarFileClassLoader

java.lang.Object
  |
  +--com.dctl.j2me.system.ClassLoader
        |
        +--com.dctl.j2me.system.DynamicClassLoader
              |
              +--com.dctl.j2me.system.JarFileClassLoader

public class JarFileClassLoader
extends DynamicClassLoader


Field Summary
 
Fields inherited from class com.dctl.j2me.system.ClassLoader
defaultClassLoader
 
Constructor Summary
JarFileClassLoader(com.dctl.util.zip.JarFile _jf)
          Constructor
JarFileClassLoader(java.lang.String url)
          Constructor
 
Method Summary
 byte[] getClassFileData(java.lang.String className)
          Get the raw class file data for a particular class in a JAR file.
 InputStream loadResource(java.lang.String name)
          Load a resource from a JarFile.
 
Methods inherited from class com.dctl.j2me.system.DynamicClassLoader
loadClass
 
Methods inherited from class com.dctl.j2me.system.ClassLoader
setDynamicClassLoader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarFileClassLoader

public JarFileClassLoader(com.dctl.util.zip.JarFile _jf)
Constructor

Parameters:
_jf - - an already existing JarFile object

JarFileClassLoader

public JarFileClassLoader(java.lang.String url)
                   throws IOException
Constructor

Parameters:
url - - the URL of where the jarfile is
Method Detail

getClassFileData

public byte[] getClassFileData(java.lang.String className)
                        throws ClassNotFoundException
Get the raw class file data for a particular class in a JAR file.

Specified by:
getClassFileData in class DynamicClassLoader
Parameters:
className - - the name of the class to obtain the data for
Returns:
- a byte array containing the raw data for the classfile
Throws:
ClassNotFoundException - If the class cannot be found

loadResource

public InputStream loadResource(java.lang.String name)
Load a resource from a JarFile.

Overrides:
loadResource in class ClassLoader
Parameters:
name - - the name of the resource
Returns:
- the input stream or null if not found

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification