Package com.oss.util

Class BERTool.Tag

java.lang.Object
com.oss.util.BERTool.Tag
Enclosing class:
BERTool

public static class BERTool.Tag extends Object
Represents BER tags.
  • Method Details

    • getTagClass

      public BERTool.TagClass 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

      public BERTool.ValueType 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

      public String 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

      public boolean equals(Object other)
      Tests for equality with another tag.
      Overrides:
      equals in class Object
      Parameters:
      other - another tag used to compare for equality.
      Returns:
      true when the tags are equal.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      the hashcode of this tag.
    • toString

      public String toString()
      Gets the ASN.1 syntax of this tag as a string. For example, "[0]", "[APPLICATION 123]", or "[UNIVERSAL 16]".
      Overrides:
      toString in class Object
      Returns:
      the ASN.1 syntax of this tag.