com.gargoylesoftware.htmlunit.html.applets
Class AppletClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by com.gargoylesoftware.htmlunit.html.applets.AppletClassLoader

public class AppletClassLoader
extends ClassLoader

INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Class loader for loading applets.

Version:
$Revision: 5806 $
Author:
Marc Guillemot

Constructor Summary
AppletClassLoader()
          The constructor.
 
Method Summary
 void addToClassPath(WebResponse webResponse)
          Adds the content of specified WebResponse to the classpath for the applet.
 Class<?> loadClass(String name)
          
static String readClassName(byte[] bytes)
          Reads the class name from the bytes of a .class file.
static String readClassName(WebResponse webResponse)
          Reads the class name from the bytes of a .class file.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppletClassLoader

public AppletClassLoader()
The constructor.

Method Detail

loadClass

public Class<?> loadClass(String name)
                   throws ClassNotFoundException

Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException

addToClassPath

public void addToClassPath(WebResponse webResponse)
                    throws IOException
Adds the content of specified WebResponse to the classpath for the applet.

Parameters:
webResponse - the web response
Throws:
IOException - in case of problem working with the response content

readClassName

public static String readClassName(WebResponse webResponse)
Reads the class name from the bytes of a .class file.

Parameters:
webResponse - response containing the bytes the class
Returns:
the full class name

readClassName

public static String readClassName(byte[] bytes)
Reads the class name from the bytes of a .class file.

Parameters:
bytes - the class bytes
Returns:
the full class name


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.