Enum Class TLVClass

java.lang.Object
java.lang.Enum<TLVClass>
org.jpos.tlv.TLVClass
All Implemented Interfaces:
Serializable, Comparable<TLVClass>, Constable

public enum TLVClass extends Enum<TLVClass>
BER-TLV tag class encoded in bits 7–8 of the first tag byte.
  • Enum Constant Details

    • UNIVERSAL

      public static final TLVClass UNIVERSAL
      Class bits 00 — universally defined tag.
    • APPLICATION

      public static final TLVClass APPLICATION
      Class bits 01 — application-specific tag.
    • CONTEXT_SPECIFIC

      public static final TLVClass CONTEXT_SPECIFIC
      Class bits 10 — context-specific tag (most EMV tags).
    • PRIVATE

      public static final TLVClass PRIVATE
      Class bits 11 — private-use tag.
  • Method Details

    • values

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

      public static TLVClass valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static TLVClass valueOf(byte firstByte)
      Resolves the TLVClass encoded in the top two bits of firstByte.
      Parameters:
      firstByte - the first byte of a BER-TLV tag
      Returns:
      the matching class, defaulting to UNIVERSAL