FileDocCategorySizeDatePackage
JConstantUtf8.javaAPI DocphoneME MR2 API (J2ME)1972Wed May 02 18:00:40 BST 2007com.sun.satsa.jcrmic.classfile.constants

JConstantUtf8

public class JConstantUtf8 extends JConstant
This class represents constant string value.

Fields Summary
private String
string
The value.
Constructors Summary
public JConstantUtf8(JConstantPool cp)
Constructor.

param
cp constant pool reference

        super(cp);
    
Methods Summary
public java.lang.StringgetString()
Returns the value.

return
the value.

        return string;
    
public voidparse(java.io.DataInputStream dis)
Parses constant pool entry.

param
dis input stream
throws
IOException if I/O exception occurs

        int length = dis.readUnsignedShort();
        byte[] contents = new byte[length];
        dis.readFully(contents);
        string = new String(contents);