gnu.bytecode
Class ClassFileInput
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
gnu.bytecode.ClassFileInput
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataInput
- Direct Known Subclasses:
- dump
public class ClassFileInput
- extends java.io.DataInputStream
Class to read a ClassType from a DataInputStream (.class file).
Fields inherited from class java.io.FilterInputStream |
in |
Methods inherited from class java.io.DataInputStream |
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassFileInput
public ClassFileInput(java.io.InputStream str)
throws java.io.IOException
- Throws:
java.io.IOException
ClassFileInput
public ClassFileInput(ClassType ctype,
java.io.InputStream str)
throws java.io.IOException,
java.lang.ClassFormatError
- Throws:
java.io.IOException
java.lang.ClassFormatError
readClassType
public static ClassType readClassType(java.io.InputStream str)
throws java.io.IOException,
java.lang.ClassFormatError
- Read a class (in .class format) from an InputStream.
- Returns:
- A new ClassType object representing the class that was read.
- Throws:
java.io.IOException
java.lang.ClassFormatError
readHeader
public boolean readHeader()
throws java.io.IOException
- Throws:
java.io.IOException
readConstants
public ConstantPool readConstants()
throws java.io.IOException
- Throws:
java.io.IOException
readClassInfo
public void readClassInfo()
throws java.io.IOException
- Throws:
java.io.IOException
readAttributes
public int readAttributes(AttrContainer container)
throws java.io.IOException
- Throws:
java.io.IOException
skipAttribute
public final void skipAttribute(int length)
throws java.io.IOException
- Throws:
java.io.IOException
readAttribute
public Attribute readAttribute(java.lang.String name,
int length,
AttrContainer container)
throws java.io.IOException
- Throws:
java.io.IOException
readFields
public void readFields()
throws java.io.IOException
- Throws:
java.io.IOException
readMethods
public void readMethods()
throws java.io.IOException
- Throws:
java.io.IOException