Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.licel.jcardsim.samples.wallet
Class Wallet

    java.lang.Object
      javacard.framework.Applet
          com.licel.jcardsim.samples.wallet.Wallet

    public class Wallet

extends Applet

Method Summary
`void` | `deselect()` Called by the Java Card runtime environment to inform that this currently selected applet is being deselected on this logical channel and no applet from the same package is still active on any other logical channel.
`static void` | `install(byte[] bArray, short bOffset, byte bLength)`
`void` | `process(APDU apdu)` Called by the Java Card runtime environment to process an incoming APDU command.
`boolean` | `select()` Called by the Java Card runtime environment to inform this applet that it has been selected when no applet from the same package is active on any other logical channel.

Methods inherited from class javacard.framework.Applet
`getShareableInterfaceObject, register, register, selectingApplet`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### install

    public static void install(byte[] bArray,
                               short bOffset,
                               byte bLength)

### select

    public boolean select()

  Description copied from class: `Applet`
  Called by the Java Card runtime environment to inform this applet that it has been selected when no applet from the same package is active on any other logical channel.

  It is called when a SELECT APDU command or MANAGE CHANNEL OPEN APDU command is received and before the applet is selected. SELECT APDU commands use instance AID bytes for applet selection. See Runtime Environment Specification for the Java Card Platform, section 4.5 for details.

  A subclass of `Applet` should override this method if it should perform any initialization that may be required to process APDU commands that may follow. This method returns a boolean to indicate that it is ready to accept incoming APDU commands via its `process()` method. If this method returns false, it indicates to the Java Card runtime environment that this Applet declines to be selected.

  Note:

  - The `javacard.framework.MultiSelectable.select(`) method is not called if this method is invoked.

  The implementation of this method provided by `Applet` class returns `true`.

  Overrides:
    `select` in class `Applet`
  Returns:
    `true` to indicate success, `false` otherwise

### deselect

    public void deselect()

  Description copied from class: `Applet`
  Called by the Java Card runtime environment to inform that this currently selected applet is being deselected on this logical channel and no applet from the same package is still active on any other logical channel. After deselection, this logical channel will be closed or another applet (or the same applet) will be selected on this logical channel. It is called when a SELECT APDU command or a MANAGE CHANNEL CLOSE APDU command is received by the Java Card runtime environment. This method is invoked prior to another applet's or this very applet's `select()` method being invoked.

  A subclass of `Applet` should override this method if it has any cleanup or bookkeeping work to be performed before another applet is selected.

  The default implementation of this method provided by `Applet` class does nothing.

  Notes:

  - The `javacard.framework.MultiSelectable.deselect(`) method is not called if this method is invoked.
  - Unchecked exceptions thrown by this method are caught by the Java Card runtime environment but the applet is deselected.
  - Transient objects of `JCSystem.CLEAR_ON_DESELECT` clear event type are cleared to their default value by the Java Card runtime environment after this method.
  - This method is NOT called on reset or power loss.

  Overrides:
    `deselect` in class `Applet`

### process

    public void process(APDU apdu)

  Description copied from class: `Applet`
  Called by the Java Card runtime environment to process an incoming APDU command. An applet is expected to perform the action requested and return response data if any to the terminal.

  Upon normal return from this method the Java Card runtime environment sends the ISO 7816-4 defined success status (90 00) in APDU response. If this method throws an `ISOException` the Java Card runtime environment sends the associated reason code as the response status instead.

  The Java Card runtime environment zeroes out the APDU buffer before receiving a new APDU command from the CAD. The five header bytes of the APDU command are available in APDU buffer[0..4] at the time this method is called.

  The `APDU` object parameter is a temporary Java Card runtime environment Entry Point Object. A temporary Java Card runtime environment Entry Point Object can be accessed from any applet context. References to these temporary objects cannot be stored in class variables or instance variables or array components.

  Notes:

  - APDU buffer[5..] is undefined and should not be read or written prior to invoking the `APDU.setIncomingAndReceive()` method if incoming data is expected. Altering the APDU buffer[5..] could corrupt incoming data.

  Specified by:
    `process` in class `Applet`
  Parameters:
    `apdu` - the incoming `APDU` object
  See Also:
    `APDU`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD