TLVException (Java Card API, Connected Edition)
Date: 2009-12-11

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javacardx.framework.tlv
Class TLVException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  javacard.framework.CardRuntimeException
                      javacardx.framework.tlv.TLVException

    @TransactionType(value=NOT_SUPPORTED)
    public class TLVException

extends CardRuntimeException

`TLVException` represents a TLV-related exception.

Direct instances of this exception class are not bound to any context and can be passed between contexts without any restrictions. Objects created and returned by the methods of this class are owned by the caller. In particular, a call to the `Throwable.toString()` returns a String instance bound to the owner context of the caller.

See Runtime Environment Specification for the Java Card Platform, Connected Edition, chapter 7 for details regarding transfer of ownership.

Since:
  2.2.2

Field Summary
`static short` | `EMPTY_TAG` This reason code is used to indicate that the Tag object is empty
`static short` | `EMPTY_TLV` This reason code is used to indicate that the TLV object is empty
`static 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
`static short` | `INSUFFICIENT_STORAGE` This reason code is used to indicate that the configured storage capacity of the object will be exceeded
`static short` | `INVALID_PARAM` This reason code is used to indicate that one or more input parameters is invalid.
`static short` | `MALFORMED_TAG` This reason code is used to indicate that the tag representation is not a well-formed BER Tag
`static short` | `MALFORMED_TLV` This reason code is used to indicate that the TLV representation is not a well-formed BER TLV
`static short` | `TAG_NUMBER_GREATER_THAN_32767` This reason code is used to indicate that the tag number value greater than 32767
`static 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
`static 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
`static short` | `TLV_SIZE_GREATER_THAN_32767` This reason code is used to indicate that the TLV requires more that 32767 bytes to represent

Constructor Summary
`TLVException(short reason)` Constructs a `TLVException` with the specified reason.

Method Summary
`static void` | `throwIt(short reason)` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use constructor instead.

Methods inherited from class javacard.framework.CardRuntimeException
`getReason, setReason`

Methods inherited from class java.lang.Throwable
`getMessage, printStackTrace, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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:
    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:
    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:
    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:
    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:
    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:
    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:
    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:
    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:
    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:
    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:
    Constant Field Values

Constructor Detail

### TLVException

    public TLVException(short reason)

  Constructs a `TLVException` with the specified reason.

  Parameters:
    `reason` - the reason for the exception

Method Detail

### throwIt

    public static void throwIt(short reason)

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use constructor instead.

  Throws a new instance of `TLVException` with the specified reason.

  Note that a new instance is thrown upon each call to this method.

  This method is for backward compatibility with Java Card 2.x and for interoperability of classic applet applications with the Java Card 3 Classic edition.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.