Enum TagClass

java.lang.Object
java.lang.Enum<TagClass>
org.apache.kerby.asn1.TagClass
All Implemented Interfaces:
Serializable, Comparable<TagClass>

public enum TagClass extends Enum<TagClass>
Tag class defined by the spec.
  • Enum Constant Details

    • UNKNOWN

      public static final TagClass UNKNOWN
    • UNIVERSAL

      public static final TagClass UNIVERSAL
    • APPLICATION

      public static final TagClass APPLICATION
    • CONTEXT_SPECIFIC

      public static final TagClass CONTEXT_SPECIFIC
    • PRIVATE

      public static final TagClass PRIVATE
  • Method Details

    • values

      public static TagClass[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TagClass valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the tag class value.
      Returns:
      value
    • isUniversal

      public boolean isUniversal()
      Tell it's universal or not.
      Returns:
      true if it's universal otherwise false
    • isAppSpecific

      public boolean isAppSpecific()
    • isContextSpecific

      public boolean isContextSpecific()
    • isSpecific

      public boolean isSpecific()
    • fromValue

      public static TagClass fromValue(int value)
      Converted from an integer
      Parameters:
      value - The int value of tag class
      Returns:
      tag class
    • fromTag

      public static TagClass fromTag(int tag)
      Converted from a tag value, which contains tag class info.
      Parameters:
      tag - The int value of tag class
      Returns:
      tag class