gnu.bytecode

Class ClassFileInput

Known Direct Subclasses:
dump

public class ClassFileInput
extends DataInputStream

Class to read a ClassType from a DataInputStream (.class file).

Constructor Summary

ClassFileInput(InputStream str)
ClassFileInput(ClassType ctype, InputStream str)

Method Summary

Attribute
readAttribute(String name, int length, AttrContainer container)
int
readAttributes(AttrContainer container)
void
readClassInfo()
static ClassType
readClassType(InputStream str)
Read a class (in .class format) from an InputStream.
ConstantPool
readConstants()
void
readFields()
boolean
readHeader()
void
readMethods()
void
skipAttribute(int length)

Constructor Details

ClassFileInput

public ClassFileInput(InputStream str)
            throws IOException

ClassFileInput

public ClassFileInput(ClassType ctype,
                      InputStream str)
            throws IOException,
                   ClassFormatError

Method Details

readAttribute

public Attribute readAttribute(String name,
                               int length,
                               AttrContainer container)
            throws IOException

readAttributes

public int readAttributes(AttrContainer container)
            throws IOException

readClassInfo

public void readClassInfo()
            throws IOException

readClassType

public static ClassType readClassType(InputStream str)
            throws IOException,
                   ClassFormatError
Read a class (in .class format) from an InputStream.
Returns:
A new ClassType object representing the class that was read.

readConstants

public ConstantPool readConstants()
            throws IOException

readFields

public void readFields()
            throws IOException

readHeader

public boolean readHeader()
            throws IOException

readMethods

public void readMethods()
            throws IOException

skipAttribute

public final void skipAttribute(int length)
            throws IOException