public class Asn1Tag
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static short |
APPL
Mask value for an APPLICATION tag
|
static short |
Bit8Mask
Bit 8 (MSB) octet mask value
|
static short |
ClassMask
Mask value to mask the class bits from a tag
|
static short |
CONS
Mask value for CONSTRUCTED form
|
static short |
CTXT
Mask value for a context-specific tag
|
static Asn1Tag |
ENUM
ASN.1 ENUMERATED type tag value
|
static Asn1Tag |
EOC
ASN.1 end-of-contents (EOC) type tag value
|
static boolean |
EXPL
This specifies that explicit tagging should be used.
|
static short |
EXTIDCODE
Mask value for extended tag identifier indicator
|
static short |
FormMask
Mask value to mask the form bit from a tag
|
static short |
IDMask
Mask value to mask the tag ID bits from a tag
|
static boolean |
IMPL
This specifies that implicit tagging should be used.
|
static short |
L7BitsMask
Lower 7 bits octet mask value
|
short |
mClass
Tag class value (UNIV, APPL, CTXT, or PRIV)
|
short |
mForm
Tag form value (PRIM or CONS)
|
int |
mIDCode
Tag ID code
|
static short |
PRIM
Mask value for PRIMITIVE form
|
static short |
PRIV
Mask value for a PRIVATE tag
|
static Asn1Tag |
SEQUENCE
ASN.1 SEQUENCE type tag value
|
static Asn1Tag |
SET
ASN.1 SET type tag value
|
static short |
UNIV
Mask value for a UNIVERSAL tag
|
Constructor and Description |
---|
Asn1Tag()
The default constructor initializes all fields to zero.
|
Asn1Tag(Asn1Tag _tag)
The copy constructor initializes all fields to those from the given tag
parameter.
|
Asn1Tag(short class_,
short form,
int idCode)
This constructor initializes all fields to the given values
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Asn1Tag o)
Compare this tag with the given tag.
|
boolean |
equals(java.lang.Object _tag)
This method compares this tag with the given tag value for
equality.
|
boolean |
equals(short class_,
short form,
int idCode)
This method compares this tag with the given tag value for
equality.
|
boolean |
isConstructed()
This method tests if the tag is constructed.
|
boolean |
isEOC()
This method tests if the tag is an end-of-contents (EOC) tag.
|
void |
setEqualTo(Asn1Tag o)
Assign this tag to match the given tag.
|
java.lang.String |
toString()
This method will return a formatted string representing the
tag value.
|
public static final boolean EXPL
public static final boolean IMPL
public static final short UNIV
public static final short APPL
public static final short CTXT
public static final short PRIV
public static final short ClassMask
public static final short PRIM
public static final short CONS
public static final short FormMask
public static final short EXTIDCODE
public static final short IDMask
public static final Asn1Tag ENUM
public static final Asn1Tag EOC
public static final Asn1Tag SEQUENCE
public static final Asn1Tag SET
public static final short Bit8Mask
public static final short L7BitsMask
public transient short mClass
public transient short mForm
public transient int mIDCode
public Asn1Tag()
public Asn1Tag(Asn1Tag _tag)
_tag
- The input tag value to copy.public Asn1Tag(short class_, short form, int idCode)
class_
- Tag class value (UNIV, APPL, CTXT, or PRIV)form
- Tag form value (PRIM or CONS)idCode
- Tag identifier codepublic int compareTo(Asn1Tag o)
public boolean equals(short class_, short form, int idCode)
class_
- Tag class value (UNIV, APPL, CTXT, or PRIV)form
- Tag form value (PRIM or CONS)idCode
- Tag identifier codepublic boolean equals(java.lang.Object _tag)
equals
in class java.lang.Object
_tag
- Asn1Tag object to which this tag is to be comparedpublic boolean isConstructed()
public boolean isEOC()
public final void setEqualTo(Asn1Tag o)
o
- The given tag.public java.lang.String toString()
toString
in class java.lang.Object