Package opencard.opt.applet
Class ISOAppletSelector
- java.lang.Object
-
- opencard.opt.applet.ISOAppletSelector
-
- All Implemented Interfaces:
AppletSelector
public class ISOAppletSelector extends java.lang.Object implements AppletSelector
The ISOAppletSelector is a class providing the selectApplet functionality as specified in the AppletSelector interface. It uses the SELECT FILE command as requested by ISO7816-5 and standardized by ISO7816-4 norms. It is a helper class, not a regular CardService, as it will always use a CardChannel provided by client CardServices.- Since:
- OCF1.2
- Author:
- Christophe.Muller@research.gemplus.com
- See Also:
AppletSelector
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
MAX_APDU_SIZE
Maximum APDU size allowed by cardprotected static byte
SELECT_CLASS
protected static byte
SELECT_INS
protected static byte
SELECT_P1
protected static byte
SELECT_P2
protected static byte
SELECT_SW1_ERROR
protected static byte
SELECT_SW1_WARNING
protected static byte
SELECT_SW2_INCORRECTLC
protected static byte
SELECT_SW2_INCORRECTP1P2
protected static byte
SELECT_SW2_INVALID
protected static byte
SELECT_SW2_NOTFOUND
protected static byte
SELECT_SW2_UNFORMAT
protected static byte
SELECT_SW2_UNSUPPORTED
protected static short
SW_OK
-
Constructor Summary
Constructors Constructor Description ISOAppletSelector()
Instantiate a ISOAppletSelector object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AppletInfo
selectApplet(CardChannel channel, AppletID appletID)
Selects a Card Applet with the specified Application Identifier in the Card.
-
-
-
Field Detail
-
SELECT_CLASS
protected static final byte SELECT_CLASS
- See Also:
- Constant Field Values
-
SELECT_INS
protected static final byte SELECT_INS
- See Also:
- Constant Field Values
-
SELECT_P1
protected static final byte SELECT_P1
- See Also:
- Constant Field Values
-
SELECT_P2
protected static final byte SELECT_P2
- See Also:
- Constant Field Values
-
SW_OK
protected static final short SW_OK
- See Also:
- Constant Field Values
-
SELECT_SW1_WARNING
protected static final byte SELECT_SW1_WARNING
- See Also:
- Constant Field Values
-
SELECT_SW1_ERROR
protected static final byte SELECT_SW1_ERROR
- See Also:
- Constant Field Values
-
SELECT_SW2_INVALID
protected static final byte SELECT_SW2_INVALID
- See Also:
- Constant Field Values
-
SELECT_SW2_UNFORMAT
protected static final byte SELECT_SW2_UNFORMAT
- See Also:
- Constant Field Values
-
SELECT_SW2_UNSUPPORTED
protected static final byte SELECT_SW2_UNSUPPORTED
- See Also:
- Constant Field Values
-
SELECT_SW2_NOTFOUND
protected static final byte SELECT_SW2_NOTFOUND
- See Also:
- Constant Field Values
-
SELECT_SW2_INCORRECTP1P2
protected static final byte SELECT_SW2_INCORRECTP1P2
- See Also:
- Constant Field Values
-
SELECT_SW2_INCORRECTLC
protected static final byte SELECT_SW2_INCORRECTLC
- See Also:
- Constant Field Values
-
MAX_APDU_SIZE
protected static final int MAX_APDU_SIZE
Maximum APDU size allowed by card- See Also:
- Constant Field Values
-
-
Method Detail
-
selectApplet
public AppletInfo selectApplet(CardChannel channel, AppletID appletID) throws CardTerminalException, CardServiceException
Selects a Card Applet with the specified Application Identifier in the Card.Sends the ISO 7816-5
SELECT
card command (equal to the ISO 7816-4SELECT FILE
command). If this command succeeds (response=OK), returns an AppletInfo with the applet AID and the obtained ResponseAPDU stored in the "data" field.- Specified by:
selectApplet
in interfaceAppletSelector
- Parameters:
channel
- the card channel to be used during this operation.appletID
- the card applet application identifier to select.- Returns:
- applet info
an AppletInfo object with the information that has been provided by the card (or at the minimum an AppletInfo object including the Applet AID). A ResponseAPDU object can be stored in the "data" attribute of the returned AppletInfo in order to provide more detailed information to the caller. - Throws:
CardTerminalException
- Thrown when error occurs during the communication.CardServiceException
- Thrown when error occurs during execution of the operation.
-
-