Class CPUTF8
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
-
- org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry
-
- org.apache.commons.compress.harmony.unpack200.bytecode.CPUTF8
-
public class CPUTF8 extends ConstantPoolEntry
UTF8 constant pool entry, used for storing long Strings.
-
-
Field Summary
-
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry
CP_Class, CP_Double, CP_Fieldref, CP_Float, CP_Integer, CP_InterfaceMethodref, CP_Long, CP_Methodref, CP_NameAndType, CP_String, CP_UTF8, globalIndex
-
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
NONE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()voidsetGlobalIndex(int index)Sets the global index.java.lang.StringtoString()java.lang.StringunderlyingString()Gets the underlying string.protected voidwriteBody(java.io.DataOutputStream dos)Writes this instance to the given output stream.-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry
doWrite, getGlobalIndex, getTag
-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
getNestedClassFileEntries, objectHashCode, resolve, write
-
-
-
-
Constructor Detail
-
CPUTF8
public CPUTF8(java.lang.String string)
Constructs a new instance.- Parameters:
string- a constant pool string.
-
CPUTF8
public CPUTF8(java.lang.String string, int globalIndex)
Creates a new instance- Parameters:
string- a constant pool string.globalIndex- index in CpBands- Throws:
java.lang.NullPointerException- if utf8 is null.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin classConstantPoolEntry
-
hashCode
public int hashCode()
- Specified by:
hashCodein classConstantPoolEntry
-
setGlobalIndex
public void setGlobalIndex(int index)
Sets the global index.- Parameters:
index- the global index.
-
toString
public java.lang.String toString()
- Specified by:
toStringin classClassFileEntry
-
underlyingString
public java.lang.String underlyingString()
Gets the underlying string.- Returns:
- the underlying string.
-
writeBody
protected void writeBody(java.io.DataOutputStream dos) throws java.io.IOException
Description copied from class:ConstantPoolEntryWrites this instance to the given output stream.- Specified by:
writeBodyin classConstantPoolEntry- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
-