org.fife.rsta.ac.java.classreader.attributes
Class AttributeInfo

java.lang.Object
  extended by org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
Direct Known Subclasses:
Code, ConstantValue, Exceptions, Signature, SourceFile, UnsupportedAttribute

public abstract class AttributeInfo
extends Object


Field Summary
 int attributeNameIndex
           
 
Constructor Summary
protected AttributeInfo(ClassFile cf)
           
 
Method Summary
 ClassFile getClassFile()
           
 String getName()
          Returns the name of this attribute.
static UnsupportedAttribute readUnsupportedAttribute(ClassFile cf, DataInputStream in, String attrName, int attrLength)
          Reads an unknown/unsupported attribute from an input stream.
protected static void skipBytes(DataInputStream in, int count)
          Fully skips a given number of bytes in an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeNameIndex

public int attributeNameIndex
Constructor Detail

AttributeInfo

protected AttributeInfo(ClassFile cf)
Method Detail

getClassFile

public ClassFile getClassFile()

getName

public String getName()
Returns the name of this attribute.

Returns:
The name of this attribute.

readUnsupportedAttribute

public static UnsupportedAttribute readUnsupportedAttribute(ClassFile cf,
                                                            DataInputStream in,
                                                            String attrName,
                                                            int attrLength)
                                                     throws IOException
Reads an unknown/unsupported attribute from an input stream.

Parameters:
cf - The class file containing the attribute.
in - The input stream to read from.
attrName - The name of the attribute.
attrLength - The length of the data to read from in, in bytes.
Returns:
The attribute.
Throws:
IOException - If an IO error occurs.

skipBytes

protected static void skipBytes(DataInputStream in,
                                int count)
                         throws IOException
Fully skips a given number of bytes in an input stream.

Parameters:
in - The input stream.
count - The number of bytes to skip.
Throws:
IOException - If an IO error occurs.


Copyright © 2003-2011. All Rights Reserved.