|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException javacard.framework.CardRuntimeException javacard.framework.APDUException
APDUException
represents an APDU
related exception.
The APDU
class throws JCRE owned instances of APDUException
.
JCRE owned instances of exception classes are temporary JCRE 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 Java Card Runtime Environment (JCRE) Specification, section 6.2.1 for details.
APDU
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 |
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 | |
short |
getReason()
Get reason code |
void |
setReason(short reason)
Set reason code |
static void |
throwIt(short reason)
Throws the JCRE owned instance of APDUException with the specified reason. |
Methods inherited from class java.lang.Object |
equals |
Field Detail |
public static final short ILLEGAL_USE
public static final short BUFFER_BOUNDS
APDU.sendBytes()
method to indicate
that the sum of buffer offset parameter and the byte length parameter exceeds the APDU
buffer size.
public static final short BAD_LENGTH
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.
public static final short IO_ERROR
public static final short NO_T0_GETRESPONSE
APDU.process()
method.
public static final short T1_IFD_ABORT
APDU.process()
method.
Constructor Detail |
public APDUException(short reason)
throwIt()
to use the JCRE owned instance of this class.
reason
- the reason for the exception.Method Detail |
public static void throwIt(short reason)
APDUException
with the specified reason.
JCRE owned instances of exception classes are temporary JCRE 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 Java Card Runtime Environment (JCRE) Specification, section 6.2.1 for details.
reason
- the reason for the exception.
APDUException
- always.public short getReason()
getReason
in class CardRuntimeException
public void setReason(short reason)
setReason
in class CardRuntimeException
reason
- the reason for the exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |