org.sourceforge.jemm.weaver.io
Class FileLoader

java.lang.Object
  extended by org.sourceforge.jemm.weaver.io.FileLoader
All Implemented Interfaces:
ClassLoader

public class FileLoader
extends java.lang.Object
implements ClassLoader

Loads Class file contents using File System.

Author:
Paul Keeble

Constructor Summary
FileLoader(java.io.File baseDirectory)
          Creates a FileLoader with the given base directory.
 
Method Summary
 byte[] readClass(java.lang.String className)
          Finds a class in the Readers space and loads all the bytes of the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLoader

public FileLoader(java.io.File baseDirectory)
Creates a FileLoader with the given base directory.

Parameters:
baseDirectory - The base directory to load from.
Method Detail

readClass

public byte[] readClass(java.lang.String className)
                 throws ClassNotFoundException,
                        java.io.IOException
Description copied from interface: ClassLoader
Finds a class in the Readers space and loads all the bytes of the file.

Specified by:
readClass in interface ClassLoader
Parameters:
className - the fully qualified file name using /'s as separators. eg com/package/Name.class
Returns:
The bytes representing the contents of the found file.
Throws:
ClassNotFoundException - If the given class can not be found.
java.io.IOException - On IO Error whilst reading class.


Copyright © 2009. All Rights Reserved.