|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.ber.tlv.Tag
The Tag component of a BER TLV Tuple.
Field Summary | |
private int |
bytePos
Current position in the tagBytes |
static int |
CONSTRUCTED_FLAG
tag flag for the primitive/constructed bit - 0010 0000 - 0x20 |
static int |
FOUR_OCTET_IDMAX
the max id size with four tag octets |
private int |
id
the int used to store the tag octets |
private boolean |
isPrimitive
whether or not this tag represents a primitive type |
static int |
LONG_FLAG
tag flag indicating the use of the long tag encoding form |
static int |
LONG_MASK
tag mask for the long tag format - 0111 1111 - 0x7F |
static int |
MAX_TAG_BYTES
The maximum bytes number that could be used to hold the value. |
static int |
ONE_OCTET_IDMAX
the max id size with one tag octet |
static long |
serialVersionUID
|
static int |
SHORT_MASK
tag mask for the short tag format - 0001 1111 - 0x1F |
private int |
size
the number of octets currently read |
static int |
TAG_MAX_FLAG
the bit that signal that the value will overflow |
private byte[] |
tagBytes
The bytes read from the PDU. |
static int |
THREE_OCTET_IDMAX
the max id size with three tag octets |
static int |
TWO_OCTET_IDMAX
the max id size with two tag octets |
static int[] |
TYPE_CLASS
array of the different Type classes |
static int |
TYPE_CLASS_APPLICATION
value for the application type class |
static int |
TYPE_CLASS_CONTEXT_SPECIFIC
value for the context specific type class |
static int |
TYPE_CLASS_MASK
mask to get the type class value |
static int |
TYPE_CLASS_PRIVATE
value for the private type class |
static int |
TYPE_CLASS_UNIVERSAL
value for the universal type class |
private int |
typeClass
the type class of this tag |
Constructor Summary | |
Tag()
Creates a new Tag object. |
Method Summary | |
void |
addByte(byte octet)
Add a byte to the inner representation of the tag. |
java.lang.Object |
clone()
Clone the Tag |
int |
getId()
Gets the id which represent the tag. |
int |
getSize()
Gets the number of octets of this Tag. |
byte |
getTagByte()
Get the first byte of the tag. |
byte[] |
getTagBytes()
|
byte |
getTagBytes(int pos)
Get the byte at a specific position of the tag's bytes |
int |
getTypeClass()
Gets the type class for this Tag. |
void |
incTagSize()
Gets the number of octets in this Tag. |
boolean |
isApplication()
Tells if the tag class is Application or not |
boolean |
isConstructed()
Checks to see if the tag is constructed. |
boolean |
isContextual()
Tells if the tag class is Contextual or not |
boolean |
isPrimitive()
Checks to see if the tag represented by this Tag is primitive or constructed. |
boolean |
isPrivate()
Tells if the tag class is Private or not |
boolean |
isUniversal()
Tells if the tag is Universal or not |
void |
reset()
Reset the tag so that it can be reused. |
void |
setId(int id)
Set the id. |
void |
setPrimitive(boolean isPrimitive)
Set the tag type to Primitive or Constructed |
void |
setSize(int size)
Gets the number of octets in this Tag. |
void |
setTypeClass(int typeClass)
Gets the type class for this Tag. |
java.lang.String |
toString()
A string representation of a Tag |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final long serialVersionUID
public static final transient int CONSTRUCTED_FLAG
public static final transient int SHORT_MASK
public static final transient int LONG_MASK
public static final transient int LONG_FLAG
public static final transient int ONE_OCTET_IDMAX
public static final transient int TWO_OCTET_IDMAX
public static final transient int THREE_OCTET_IDMAX
public static final transient int FOUR_OCTET_IDMAX
public static final transient int TAG_MAX_FLAG
public static final transient int TYPE_CLASS_UNIVERSAL
public static final transient int TYPE_CLASS_APPLICATION
public static final transient int TYPE_CLASS_CONTEXT_SPECIFIC
public static final transient int TYPE_CLASS_PRIVATE
public static final transient int TYPE_CLASS_MASK
public static final transient int MAX_TAG_BYTES
public static final int[] TYPE_CLASS
private int id
private int size
private boolean isPrimitive
private int typeClass
private byte[] tagBytes
private int bytePos
Constructor Detail |
public Tag()
Method Detail |
public void reset()
public int getId()
public void setId(int id)
id
- The id to be setpublic int getSize()
public void setSize(int size)
size
- The size of the tagpublic void incTagSize()
public int getTypeClass()
public void setTypeClass(int typeClass)
typeClass
- The TypeClass to setpublic boolean isConstructed()
public boolean isPrimitive()
public boolean isUniversal()
public boolean isApplication()
public boolean isPrivate()
public boolean isContextual()
public void setPrimitive(boolean isPrimitive)
isPrimitive
- The type to setpublic void addByte(byte octet)
octet
- The byte to add.public byte getTagByte()
public byte[] getTagBytes()
public byte getTagBytes(int pos)
pos
- The position
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- Thrown if we have a cloning problempublic java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |