Package javacard.framework
Class APDUException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javacard.framework.CardRuntimeException
-
- javacard.framework.APDUException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
APDUExceptionSubclass
public class APDUException extends CardRuntimeException
APDUException
represents anAPDU
related exception.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static short
BAD_LENGTH
TheAPDU.setOutgoingLength()
method is using this reason code to indicate that the length parameter is greater that 256 or if non BLOCK CHAINED data transfer is requested andlen
is greater than (IFSD-2), where IFSD is the Outgoing Block Size.static short
BUFFER_BOUNDS
TheAPDU.sendBytes()
method is using this reason code 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
Constructors Constructor Description APDUException(short reason)
Constructs an APDUException.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
throwIt(short reason)
Throws an instance ofAPDUException
with the specified reason.-
Methods inherited from class javacard.framework.CardRuntimeException
getReason, setReason
-
-
-
-
Field Detail
-
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
-
BUFFER_BOUNDS
public static final short BUFFER_BOUNDS
TheAPDU.sendBytes()
method is using this reason code to indicate that the sum of buffer offset parameter and the byte length parameter exceeds the APDU buffer size.- See Also:
- Constant Field Values
-
BAD_LENGTH
public static final short BAD_LENGTH
TheAPDU.setOutgoingLength()
method is using this reason code to indicate that the length parameter is greater that 256 or if non BLOCK CHAINED data transfer is requested andlen
is greater than (IFSD-2), where IFSD is the Outgoing Block Size.- See Also:
- Constant Field Values
-
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
-
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. The outgoing transfer has been aborted. No more data or status can be sent to the CAD in thisAPDU.process()
method.- See Also:
- Constant Field Values
-
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. The incoming or outgoing transfer has been aborted. No more data can be received from the CAD. No more data or status can be sent to the CAD in thisAPDU.process()
method.- See Also:
- Constant Field Values
-
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. The outgoing transfer has been aborted. No more data or status can be sent to the CAD in thisAPDU.process()
method.- See Also:
- Constant Field Values
-
-
Method Detail
-
throwIt
public static void throwIt(short reason)
Throws an instance ofAPDUException
with the specified reason.- Parameters:
reason
- the reason for the exception.- Throws:
APDUException
- always.
-
-