Class TLVException


public class TLVException extends CardRuntimeException
TLVException represents a TLV-related exception.

The API classes throw Java Card runtime environment-owned instances of TLVException.

Java Card runtime environment-owned instances of exception classes are temporary Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these temporary objects cannot be stored in class variables, instance variables, or array components.

Since:
2.2.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    This reason code is used to indicate that the Tag object is empty
    static final short
    This reason code is used to indicate that the TLV object is empty
    static final short
    This reason code is used to indicate that the size of a TLV or Tag representation in the input parameter is greater than the supported size or will result in in a TLV structure of greater than supported size
    static final short
    This reason code is used to indicate that the configured storage capacity of the object will be exceeded
    static final short
    This reason code is used to indicate that one or more input parameters is invalid.
    static final short
    This reason code is used to indicate that the tag representation is not a well-formed BER Tag
    static final short
    This reason code is used to indicate that the TLV representation is not a well-formed BER TLV
    static final short
    This reason code is used to indicate that the tag number value greater than 32767
    static final short
    This reason code is used to indicate that the size of the tag representation is greater than 127 bytes
    static final short
    This reason code is used to indicate that the Length component value in the TLV is greater than 32767
    static final short
    This reason code is used to indicate that the TLV requires more that 32767 bytes to represent
  • Constructor Summary

    Constructors
    Constructor
    Description
    TLVException(short reason)
    Constructs a TLVException with the specified reason.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    throwIt(short reason)
    Throws the Java Card runtime environment-owned instance of TLVException with the specified reason.

    Methods inherited from class CardRuntimeException

    getReason, setReason
    Modifier and Type
    Method
    Description
    short
    Gets the reason code
    void
    setReason(short reason)
    Sets the reason code.

    Methods inherited from class Object

    equals
    Modifier and Type
    Method
    Description
    boolean
    Compares two Objects for equality.
  • Field Details

    • INVALID_PARAM

      public static final short INVALID_PARAM
      This reason code is used to indicate that one or more input parameters is invalid.
      See Also:
    • ILLEGAL_SIZE

      public static final short ILLEGAL_SIZE
      This reason code is used to indicate that the size of a TLV or Tag representation in the input parameter is greater than the supported size or will result in in a TLV structure of greater than supported size
      See Also:
    • EMPTY_TAG

      public static final short EMPTY_TAG
      This reason code is used to indicate that the Tag object is empty
      See Also:
    • EMPTY_TLV

      public static final short EMPTY_TLV
      This reason code is used to indicate that the TLV object is empty
      See Also:
    • MALFORMED_TAG

      public static final short MALFORMED_TAG
      This reason code is used to indicate that the tag representation is not a well-formed BER Tag
      See Also:
    • MALFORMED_TLV

      public static final short MALFORMED_TLV
      This reason code is used to indicate that the TLV representation is not a well-formed BER TLV
      See Also:
    • INSUFFICIENT_STORAGE

      public static final short INSUFFICIENT_STORAGE
      This reason code is used to indicate that the configured storage capacity of the object will be exceeded
      See Also:
    • TAG_SIZE_GREATER_THAN_127

      public static final short TAG_SIZE_GREATER_THAN_127
      This reason code is used to indicate that the size of the tag representation is greater than 127 bytes
      See Also:
    • TAG_NUMBER_GREATER_THAN_32767

      public static final short TAG_NUMBER_GREATER_THAN_32767
      This reason code is used to indicate that the tag number value greater than 32767
      See Also:
    • TLV_SIZE_GREATER_THAN_32767

      public static final short TLV_SIZE_GREATER_THAN_32767
      This reason code is used to indicate that the TLV requires more that 32767 bytes to represent
      See Also:
    • TLV_LENGTH_GREATER_THAN_32767

      public static final short TLV_LENGTH_GREATER_THAN_32767
      This reason code is used to indicate that the Length component value in the TLV is greater than 32767
      See Also:
  • Constructor Details

    • TLVException

      public TLVException(short reason)
      Constructs a TLVException with the specified reason. To conserve on resources use throwIt() to use the Java Card runtime environment-owned instance of this class.
      Parameters:
      reason - the reason for the exception
  • Method Details

    • throwIt

      public static void throwIt(short reason)
      Throws the Java Card runtime environment-owned instance of TLVException with the specified reason.

      Java Card runtime environment-owned instances of exception classes are temporary Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these temporary objects cannot be stored in class variables or instance variables or array components. See Runtime Environment Specification, Java Card Platform, Classic Edition, section 6.2.1 for details.

      Parameters:
      reason - the reason for the exception
      Throws:
      TLVException - always