public class ConstantStructure
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConstantStructure.StructureType
Represents a particular type of
ConstantStructure . |
Constructor and Description |
---|
ConstantStructure(byte tag)
Creates a new
ConstantStructure with a type and length inferred
from the given byte tag. |
ConstantStructure(byte tag,
int length)
Creates a new
ConstantStructure with a type inferred from the
given byte tag and the given length. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getInfo()
Gets the content of this
ConstantStructure . |
int |
getLength()
Gets the length in bytes of this
ConstantStructure 's content. |
ConstantStructure.StructureType |
getType()
Gets the type of this
ConstantStructure . |
void |
setInfo(byte[] info)
Sets the content of this
ConstantStructure . |
public ConstantStructure(byte tag, int length)
ConstantStructure
with a type inferred from the
given byte tag and the given length.tag
- The byte tag denoting this structure's typelength
- The length of this ConstantStructure
public ConstantStructure(byte tag) throws java.lang.IllegalArgumentException
ConstantStructure
with a type and length inferred
from the given byte tag.tag
- The byte tag denoting this structure's typejava.lang.IllegalArgumentException
- If tag
denotes a UTF-8
literal (in this case a specific length
must be supplied)public byte[] getInfo()
ConstantStructure
.ConstantStructure
.public void setInfo(byte[] info)
ConstantStructure
.
Note: This method may be called only once.
info
- The content to provide this ConstantStructure
public ConstantStructure.StructureType getType()
ConstantStructure
.ConstantStructure
public int getLength()
ConstantStructure
's content.ConstantStructure
's content