**javacardx.framework.tlv** ====Class TLVException ==== *[[javacard:java-card-api:object|java.lang.Object]] \\ *[[javacard:java-card-api:throwable|java.lang.Throwable]] \\ *[[javacard:java-card-api:exception|java.lang.Exception]] \\ *[[javacard:java-card-api:runtimeexception|java.lang.RuntimeException]] \\ *[[javacard:java-card-api:cardruntimeexception|javacard.framework.CardRuntimeException]] \\ ---- public class **TLVException**extends [[javacard:java-card-api:CardRuntimeException|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 ^^ | **static short** | **[[javacard:java-card-api:TLVException#EMPTY_TAG|EMPTY_TAG]] **          This reason code is used to indicate that the Tag object is empty | | **static short** | **[[javacard:java-card-api:TLVException#EMPTY_TLV|EMPTY_TLV]] **          This reason code is used to indicate that the TLV object is empty | | **static short** | **[[javacard:java-card-api:TLVException#ILLEGAL_SIZE|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 | | **static short** | **[[javacard:java-card-api:TLVException#INSUFFICIENT_STORAGE|INSUFFICIENT_STORAGE]] **          This reason code is used to indicate that the configured storage capacity of the object will be exceeded | | **static short** | **[[javacard:java-card-api:TLVException#INVALID_PARAM|INVALID_PARAM]] **          This reason code is used to indicate that one or more input parameters is invalid. | | **static short** | **[[javacard:java-card-api:TLVException#MALFORMED_TAG|MALFORMED_TAG]] **          This reason code is used to indicate that the tag representation is not a well-formed BER Tag | | **static short** | **[[javacard:java-card-api:TLVException#MALFORMED_TLV|MALFORMED_TLV]] **          This reason code is used to indicate that the TLV representation is not a well-formed BER TLV | | **static short** | **[[javacard:java-card-api:TLVException#TAG_NUMBER_GREATER_THAN_32767|TAG_NUMBER_GREATER_THAN_32767]] **          This reason code is used to indicate that the tag number value greater than 32767 | | **static short** | **[[javacard:java-card-api:TLVException#TAG_SIZE_GREATER_THAN_127|TAG_SIZE_GREATER_THAN_127]] **          This reason code is used to indicate that the size of the tag representation is greater than 127 bytes | | **static short** | **[[javacard:java-card-api:TLVException#TLV_LENGTH_GREATER_THAN_32767|TLV_LENGTH_GREATER_THAN_32767]] **          This reason code is used to indicate that the Length component value in the TLV is greater than 32767 | | **static short** | **[[javacard:java-card-api:TLVException#TLV_SIZE_GREATER_THAN_32767|TLV_SIZE_GREATER_THAN_32767]] **          This reason code is used to indicate that the TLV requires more that 32767 bytes to represent |   ^ Constructor Summary ^^ | **[[javacard:java-card-api:TLVException#TLVException(short)|TLVException]] **(short reason)          Constructs a TLVException with the specified reason. |   ^ Method Summary ^^ | **static void** | **[[javacard:java-card-api:TLVException#throwIt(short)|throwIt]] **(short reason)          Throws the Java Card runtime environment-owned instance of TLVException with the specified reason. |   ^ Methods inherited from class javacard.framework.CardRuntimeException ^ | [[javacard:java-card-api:CardRuntimeException#getReason()|getReason]] , [[javacard:java-card-api:CardRuntimeException#setReason(short)|setReason]] |   ^ Methods inherited from class java.lang.Object ^ | [[javacard:java-card-api:Object#equals(java.lang.Object)|equals]] |   ^ Field Detail ^ === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.INVALID_PARAM|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.ILLEGAL_SIZE|Constant Field Values]] ---- === EMPTY_TAG === public static final short **EMPTY_TAG** This reason code is used to indicate that the Tag object is empty **See Also:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.EMPTY_TAG|Constant Field Values]] ---- === EMPTY_TLV === public static final short **EMPTY_TLV** This reason code is used to indicate that the TLV object is empty **See Also:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.EMPTY_TLV|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.MALFORMED_TAG|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.MALFORMED_TLV|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.INSUFFICIENT_STORAGE|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.TAG_SIZE_GREATER_THAN_127|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.TAG_NUMBER_GREATER_THAN_32767|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.TLV_SIZE_GREATER_THAN_32767|Constant Field Values]] ---- === 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:**[[javacard:java-card-api:constant-values#javacardx.framework.tlv.TLVException.TLV_LENGTH_GREATER_THAN_32767|Constant Field Values]] ^ Constructor Detail ^ === 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 Detail ^ === 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 for the Java Card Platform//, section 6.2.1 for details. **Parameters:**reason - the reason for the exception **Throws:** [[javacard:java-card-api:TLVException|TLVException]] - always