Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gjt.jclasslib.io
Class ClassFileReader

    java.lang.Object
      org.gjt.jclasslib.io.ClassFileReader

public class ClassFileReader
extends Object

Converts class files to a class file structure `ClassFile` as defined in `org.gjt.jclasslib.structures`.

Version:
  $Revision: 1.7 $ $Date: 2003/08/18 07:58:12 $
Author:
  Ingo Kegel

Method Summary
`static void` | `main(String[] args)` Test method.
`static ClassFile` | `readFromClassPath(String[] classPath, String packageName, String className)` Looks up a class file in the specified class path and converts it to a `ClassFile` structure.
`static ClassFile` | `readFromFile(File file)` Converts a class file to a `ClassFile` structure.
`static ClassFile` | `readFromInputStream(InputStream is)` Converts a class file to a `ClassFile` structure.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### readFromClassPath

    public static ClassFile readFromClassPath(String[] classPath,
                                              String packageName,
                                              String className)
                                       throws InvalidByteCodeException,
                                              IOException

  Looks up a class file in the specified class path and converts it to a `ClassFile` structure.

  Parameters:
    `classPath` - the class path from which to read the `ClassFile` structure
    `packageName` - the name of the package in which the class resides
    `className` - the simple name of the class
  Returns:
    the new `ClassFile` structure or `null` if it cannot be found
  Throws:
    `InvalidByteCodeException` - if the code is invalid
    `IOException` - if an exception occurs while reading the file

### readFromFile

    public static ClassFile readFromFile(File file)
                                  throws InvalidByteCodeException,
                                         IOException

  Converts a class file to a `ClassFile` structure.

  Parameters:
    `file` - the file from which to read the `ClassFile` structure
  Returns:
    the new `ClassFile` structure
  Throws:
    `InvalidByteCodeException` - if the code is invalid
    `IOException` - if an exception occurs while reading the file

### readFromInputStream

    public static ClassFile readFromInputStream(InputStream is)
                                         throws InvalidByteCodeException,
                                                IOException

  Converts a class file to a `ClassFile` structure.

  Parameters:
    `is` - the input stream from which to read the `ClassFile` structure
  Returns:
    the new `ClassFile` structure
  Throws:
    `InvalidByteCodeException` - if the code is invalid
    `IOException` - if an exception occurs while reading from the input stream

### main

    public static void main(String[] args)
                     throws Exception

  Test method.

  Parameters:
    `args` - arguments
  Throws:
    `Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
| ej-technologies
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD