FileDocCategorySizeDatePackage
ConstUnicode.javaAPI DocGlassfish v2 API3318Fri May 04 22:34:28 BST 2007com.sun.jdo.api.persistence.enhancer.classfile

ConstUnicode

public class ConstUnicode extends ConstBasic
Class representing a unicode string value in the constant pool

Fields Summary
public static final int
MyTag
private String
stringValue
Constructors Summary
ConstUnicode(String s)

    stringValue = s;
  
Methods Summary
public java.lang.StringasString()
return the value associated with the entry

    return stringValue;
  
voidformatData(java.io.DataOutputStream b)

    b.writeBytes(stringValue);
  
static com.sun.jdo.api.persistence.enhancer.classfile.ConstUnicoderead(java.io.DataInputStream input)

    int count = input.readShort(); // Is this chars or bytes?
    StringBuffer b = new StringBuffer();
    for (int i=0; i < count; i++) { 
      b.append(input.readChar());
    }
    return new ConstUnicode (b.toString());
  
voidresolve(ConstantPool p)

  
public inttag()
The tag of this constant entry


  /* public accessors */

           
       return MyTag; 
public java.lang.StringtoString()
A printable representation

      return "CONSTANTUnicode(" + indexAsString() + "): " + stringValue;//NOI18N