Package org.apache.bcel.classfile
Class ConstantUtf8
java.lang.Object
org.apache.bcel.classfile.Constant
org.apache.bcel.classfile.ConstantUtf8
- All Implemented Interfaces:
Serializable
,Cloneable
,Node
This class is derived from the abstract
Constant class
and represents a reference to a Utf8 encoded string.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.final void
dump
(DataOutputStream file) Dump String in Utf8 format to file stream.final String
getBytes()
static ConstantUtf8
static ConstantUtf8
getInstance
(DataInputStream file) static ConstantUtf8
final void
Deprecated.final String
toString()
Methods inherited from class org.apache.bcel.classfile.Constant
clone, copy, equals, getComparator, getTag, hashCode, setComparator
-
Constructor Details
-
ConstantUtf8
Initialize from another object. -
ConstantUtf8
- Parameters:
bytes
- Data
-
-
Method Details
-
getCachedInstance
-
getInstance
-
getInstance
- Throws:
IOException
-
accept
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
dump
Dump String in Utf8 format to file stream.- Specified by:
dump
in classConstant
- Parameters:
file
- Output file stream- Throws:
IOException
-
getBytes
- Returns:
- Data converted to string.
-
setBytes
Deprecated.- Parameters:
bytes
- the raw bytes of this Utf-8
-
toString
-