|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javacard.framework.CardRuntimeException
javacard.framework.APDUException
@TransactionType(value=NOT_SUPPORTED) public class APDUException
APDUException
represents an APDU
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.
APDU
Field Summary | |
---|---|
static short |
BAD_LENGTH
This reason code is used by the APDU.setOutgoingLength()
method to indicate
APDUException.BAD_LENGTH if len is
negative, or greater than 256 and the currently selected applet does not
implement the javacardx.apdu.ExtendedLength interface, 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)
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 |
---|
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
APDUException.BAD_LENGTH
if len
is
negative, or greater than 256 and the currently selected applet does not
implement the javacardx.apdu.ExtendedLength
interface, or
if non BLOCK CHAINED data transfer is requested and len
is
greater than (IFSD-2), where IFSD is the Outgoing Block Size. The -2
accounts for the status bytes in T=1.
public static final short IO_ERROR
public static final short NO_T0_GETRESPONSE
Applet.process()
method.
public static final short T1_IFD_ABORT
Applet.process()
method.
public static final short NO_T0_REISSUE
Applet.process()
method.
Constructor Detail |
---|
public APDUException(short reason)
reason
- the reason for the exception.Method Detail |
---|
public static void throwIt(short reason)
APDUException
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.
reason
- the reason for the exception
APDUException
- always
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |