javacard.framework
Class APDUException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javacard.framework.CardRuntimeException
                  extended by javacard.framework.APDUException

public class APDUException
extends CardRuntimeException

APDUException represents an APDU-related exception.

Since:
BlackBerry API 4.2.1

Field Summary
static short BAD_LENGTH
          This reason code is used by the APDU.setOutgoingLength() method to indicate that the length parameter is greater that 256 or if non BLOCK CHAINED data transfer is requested and len is greater than (IFSD-2), where IFSD is the Outgoing Block Size.
static short BUFFER_BOUNDS
          This reason code is used by the APDU.sendBytes() method to indicate that the sum of buffer offset parameter and the byte length parameter exceeds the APDU buffer size.
static short ILLEGAL_USE
          This APDUException reason code indicates that the method should not be invoked based on the current state of the APDU.
static short IO_ERROR
          This reason code indicates that an unrecoverable error occurred in the I/O transmission layer.
static short NO_T0_GETRESPONSE
          This reason code indicates that during T=0 protocol, the CAD did not return a GET RESPONSE command in response to a <61xx> response status to send additional data.
static short NO_T0_REISSUE
          This reason code indicates that during T=0 protocol, the CAD did not reissue the same APDU command with the corrected length in response to a <6Cxx> response status to request command reissue with the specified length.
static short T1_IFD_ABORT
          This reason code indicates that during T=1 protocol, the CAD returned an ABORT S-Block command and aborted the data transfer.
 
Constructor Summary
APDUException(short reason)
          Constructs an APDUException.
 
Method Summary
static void throwIt(short reason)
          Throws an instance of APDUException with the specified reason.
 
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

BAD_LENGTH

public static final short BAD_LENGTH
This reason code is used by the APDU.setOutgoingLength() method to indicate that the length parameter is greater that 256 or if non BLOCK CHAINED data transfer is requested and len is greater than (IFSD-2), where IFSD is the Outgoing Block Size.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

BUFFER_BOUNDS

public static final short BUFFER_BOUNDS
This reason code is used by the APDU.sendBytes() method to indicate that the sum of buffer offset parameter and the byte length parameter exceeds the APDU buffer size.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

ILLEGAL_USE

public static final short ILLEGAL_USE
This APDUException reason code indicates that the method should not be invoked based on the current state of the APDU.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

IO_ERROR

public static final short IO_ERROR
This reason code indicates that an unrecoverable error occurred in the I/O transmission layer.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

NO_T0_GETRESPONSE

public static final short NO_T0_GETRESPONSE
This reason code indicates that during T=0 protocol, the CAD did not return a GET RESPONSE command in response to a <61xx> response status to send additional data.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

T1_IFD_ABORT

public static final short T1_IFD_ABORT
This reason code indicates that during T=1 protocol, the CAD returned an ABORT S-Block command and aborted the data transfer.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

NO_T0_REISSUE

public static final short NO_T0_REISSUE
This reason code indicates that during T=0 protocol, the CAD did not reissue the same APDU command with the corrected length in response to a <6Cxx> response status to request command reissue with the specified length.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1


Constructor Detail

APDUException

public APDUException(short reason)
Constructs an APDUException.

Parameters:
reason - the reason for the exception.
Since:
BlackBerry API 4.2.1


Method Detail

throwIt

public static void throwIt(short reason)
                    throws APDUException
Throws an instance of APDUException with the specified reason.

Parameters:
reason - the reason for the exception.
Throws:
APDUException - always
Since:
BlackBerry API 4.2.1





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.