DCT Lightfoot v3 API specification

com.dctl.j2me.system
Class HttpClassLoader

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

public class HttpClassLoader
extends DynamicClassLoader

The Http class loader loads classes from a web server on the host development system


Field Summary
 
Fields inherited from class com.dctl.j2me.system.ClassLoader
defaultClassLoader
 
Constructor Summary
HttpClassLoader()
          Create a new class loader that loads from the connected system
HttpClassLoader(java.lang.String server)
          Create a new class loader from the server
 
Method Summary
protected  byte[] getClassFileData(java.lang.String className)
          Get the data for the class file
 InputStream loadResource(java.lang.String name)
          Load a resource from a server
 
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

HttpClassLoader

public HttpClassLoader()
Create a new class loader that loads from the connected system


HttpClassLoader

public HttpClassLoader(java.lang.String server)
Create a new class loader from the server

Parameters:
server - The server to use
Method Detail

getClassFileData

protected byte[] getClassFileData(java.lang.String className)
                           throws ClassNotFoundException
Get the data for the class file

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

loadResource

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

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