FileDocCategorySizeDatePackage
CONSTANT_Utf8_info.javaAPI DocAndroid 1.5 API2638Wed May 06 22:41:16 BST 2009com.vladium.jcd.cls.constant

CONSTANT_Utf8_info

public final class CONSTANT_Utf8_info extends CONSTANT_info
The CONSTANT_Utf8_info structure is used to represent constant string values.

The bytes of multibyte characters are stored in the class file in big-endian (high byte first) order. There are two differences between this format and the "standard" UTF-8 format. First, the null byte (byte)0 is encoded using the two-byte format rather than the one-byte format, so that Java Virtual Machine UTF-8 strings never have embedded nulls. Second, only the one-byte, two-byte, and three-byte formats are used. The Java Virtual Machine does not recognize the longer UTF-8 formats.

author
(C) 2001, Vlad Roubtsov

Fields Summary
public static final byte
TAG
public String
m_value
Constructors Summary
public CONSTANT_Utf8_info(String value)

    
    
        
    
        m_value = value;
    
protected CONSTANT_Utf8_info(com.vladium.jcd.lib.UDataInputStream bytes)

        m_value = bytes.readUTF ();
    
Methods Summary
public java.lang.Objectaccept(ICONSTANTVisitor visitor, java.lang.Object ctx)

        return visitor.visit (this, ctx);
    
public final bytetag()

        return TAG;
    
public java.lang.StringtoString()

        return "CONSTANT_Utf8: [" + m_value + ']";
    
public voidwriteInClassFormat(com.vladium.jcd.lib.UDataOutputStream out)

        super.writeInClassFormat (out);
        
        out.writeUTF (m_value);