public class Tag
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
Tag.Class |
An enumeration of the ASN.1 tag classes.
|
Modifier and Type | Field | Description |
---|---|---|
static Tag.Class |
APPLICATION |
A tag class.
|
static Tag.Class |
CONTEXT_SPECIFIC |
A tag class.
|
static Tag |
END_OF_CONTENTS |
The end-of-contents marker for indefinite length encoding.
|
static Tag |
EOC |
An alias for END_OF_CONTENTS.
|
static Tag.Class |
PRIVATE |
A tag class.
|
static Tag.Class |
UNIVERSAL |
A tag class.
|
Constructor | Description |
---|---|
Tag(long num) |
Creates a CONTEXT-SPECIFIC tag with the given tag number.
|
Tag(Tag.Class clazz,
long num) |
Creates a tag with the given class and number.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
Compares two tags for equality.
|
static Tag |
get(long num) |
Returns an instance of a context-specific tag with the given number.
|
long |
getNum() |
|
Tag.Class |
getTagClass() |
|
int |
hashCode() |
|
java.lang.String |
toString() |
Returns a String representation of the tag.
|
public static final Tag.Class UNIVERSAL
public static final Tag.Class APPLICATION
public static final Tag.Class CONTEXT_SPECIFIC
public static final Tag.Class PRIVATE
public static final Tag END_OF_CONTENTS
public static final Tag EOC
public Tag(Tag.Class clazz, long num)
clazz
- The class of the tag.num
- The tag number.public Tag(long num)
num
- The tag number.public long getNum()
public Tag.Class getTagClass()
public static Tag get(long num)
num
- Number.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Tag.public java.lang.String toString()
toString
in class java.lang.Object