Package com.oss.util
Class BERTool.Tag
java.lang.Object
com.oss.util.BERTool.Tag
- Enclosing class:
- BERTool
Represents BER tags.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests for equality with another tag.Gets this tag class.int
Gets this tag number.Gets this tag value type.Gets a string representation of this tag value type.int
hashCode()
boolean
Indicates whether or not the value is constructed.toString()
Gets the ASN.1 syntax of this tag as a string.
-
Method Details
-
getTagClass
Gets this tag class.- Returns:
- this tag class.
-
getTagNumber
public int getTagNumber()Gets this tag number.- Returns:
- this tag number.
-
isConstructed
public boolean isConstructed()Indicates whether or not the value is constructed.- Returns:
- true when the value is constructed.
-
getValueType
Gets this tag value type.For known universal tag numbers the method returns an associated ValueType enumerated object. When this tag class is not TagClass.UNIVERSAL or this tag number is not associated with a known ASN.1 type, the return value is ValueType.UNKNOWN.
- Returns:
- an enumerated value of ValueType.
-
getValueTypeName
Gets a string representation of this tag value type.This method returns an ASN.1 type name string such as "SET", "SEQUENCE", etc. when this tag indicates an ASN.1 built-in type. Otherwise, the ASN.1 formatted syntax of this tag is returned, for example "[0]" or "[APPLICATION 123]".
- Returns:
- the name of the value type.
-
equals
Tests for equality with another tag. -
hashCode
public int hashCode() -
toString
Gets the ASN.1 syntax of this tag as a string. For example, "[0]", "[APPLICATION 123]", or "[UNIVERSAL 16]".
-