public class APDUException extends CardRuntimeException
APDUException represents an APDU related
 exception.
 
 The APDU class throws Java Card runtime environment-owned
 instances of APDUException.
 
Java Card runtime environment-owned instances of exception classes are temporary Java Card runtime environment 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 Runtime Environment Specification, Java Card Platform, Classic Edition, section 6.2.1 for details.
APDU| Modifier and Type | Field and Description | 
|---|---|
| static short | BAD_LENGTHThis reason code is used by the  APDU.setOutgoingLength()method to indicateAPDUException.BAD_LENGTHiflenis
 negative, or greater than 256 and the currently selected applet does not
 implement thejavacardx.apdu.ExtendedLengthinterface, or
 if non BLOCK CHAINED data transfer is requested andlenis
 greater than (IFSD-2), where IFSD is the Outgoing Block Size. | 
| static short | BUFFER_BOUNDSThis 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_USEThis APDUException reason code indicates that the method should not be
 invoked based on the current state of the APDU. | 
| static short | IO_ERRORThis reason code indicates that an unrecoverable error occurred in the
 I/O transmission layer. | 
| static short | NO_T0_GETRESPONSEThis 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_REISSUEThis 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_ABORTThis reason code indicates that during T=1 protocol, the CAD returned an
 ABORT S-Block command and aborted the data transfer. | 
| Constructor and Description | 
|---|
| APDUException(short reason)Constructs an APDUException. | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | throwIt(short reason)Throws the Java Card runtime environment-owned instance of
  APDUExceptionwith the specified reason. | 
getReason, setReasonpublic 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.public APDUException(short reason)
throwIt() to use the Java Card runtime environment-owned
 instance of this class.reason - the reason for the exception.public static void throwIt(short reason)
APDUException with the specified reason.
 Java Card runtime environment-owned instances of exception classes are temporary Java Card runtime environment 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 Runtime Environment Specification, Java Card Platform, Classic Edition, section 6.2.1 for details.
reason - the reason for the exceptionAPDUException - alwaysCopyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.