jef.dna.constantInfo
Interface ConstUtf8

All Superinterfaces:
java.lang.Cloneable, ConstantInfo
All Known Implementing Classes:
ConstantUtf8

@ClosingCpInfo
public interface ConstUtf8
extends ConstantInfo

This interface has to be implemented by those classes representing a CONSTANT_Utf8_info structure. The CONSTANT_Utf8_info structure is used to represent string constants.

Author:
Francesco Russo frusso@dev.java.net

Method Summary
 int getLength()
          The value of the length item gives the number of bytes in the bytes array (not the length of the resulting string).
 byte[] getValue()
          The bytes array contains the bytes of the string.
 void setLength(int len)
          The value of the length item gives the number of bytes in the bytes array (not the length of the resulting string).
 void setValue(byte[] val)
          The bytes array contains the bytes of the string.
 
Methods inherited from interface jef.dna.constantInfo.ConstantInfo
clone, fromStream, getCpt, getTag, getType, setCpt, setTag, toStream, updateRefs, validate
 

Method Detail

getLength

int getLength()
The value of the length item gives the number of bytes in the bytes array (not the length of the resulting string). The strings in the CONSTANT_Utf8_info structure are not null-terminated.

Returns:
int The length of the byte array representing the string

setLength

void setLength(int len)
The value of the length item gives the number of bytes in the bytes array (not the length of the resulting string). The strings in the CONSTANT_Utf8_info structure are not null-terminated.

Parameters:
len - The length of the byte array representing the string

getValue

byte[] getValue()
The bytes array contains the bytes of the string. No byte may have the value (byte)0 or lie in the range (byte)0xf0-(byte)0xff.

Returns:
byte[] The byte array representing the string

setValue

void setValue(byte[] val)
The bytes array contains the bytes of the string. No byte may have the value (byte)0 or lie in the range (byte)0xf0-(byte)0xff.

Parameters:
val - The byte array representing the string