Package org.apache.commons.compress.harmony.unpack200.bytecode

# 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`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CPUTF8(String string)`
  `CPUTF8(String utf8, int globalIndex)`
  Creates a new CPUTF8 instance

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `void`
  `setGlobalIndex(int index)`
  `String`
  `toString()`
  `String`
  `underlyingString()`
  `protected void`
  `writeBody(DataOutputStream dos)`

  ### 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`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CPUTF8

    public CPUTF8(String string)

  - ### CPUTF8

    public CPUTF8(String utf8, int globalIndex)
    Creates a new CPUTF8 instance
    Parameters:
      `utf8` - TODO
      `globalIndex` - - index in CpBands
    Throws:
      `NullPointerException` - if utf8 is null

- ## Method Details

  - ### equals

    public boolean equals(Object obj)
    Specified by:
      `equals` in class `ConstantPoolEntry`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in class `ConstantPoolEntry`

  - ### setGlobalIndex

    public void setGlobalIndex(int index)

  - ### toString

    public String toString()
    Specified by:
      `toString` in class `ClassFileEntry`

  - ### underlyingString

    public String underlyingString()

  - ### writeBody

    protected void writeBody(DataOutputStream dos) throws IOException
    Specified by:
      `writeBody` in class `ConstantPoolEntry`
    Throws:
      `IOException`