FileDocCategorySizeDatePackage
Handle.javaAPI DocphoneME MR2 API (J2ME)3105Wed May 02 18:00:38 BST 2007com.sun.midp.io.j2me.apdu

Handle

public class Handle extends Object
This class represents a handle for APDU connection.

Fields Summary
int
slot
Slot number.
public int
channel
Logical channel number.
Cad
cad
CAD object.
boolean
opened
Is this connection opened?
public com.sun.midp.security.SecurityToken
token
Security token used by this connection.
public byte[]
FCI
FCI received from selected application.
public int
cardSessionId
Unique identifier of card session (period of time between card power up and powerdown) during which the connection was created.
public int
handleInstance
Unique identifier of Handle instance. It is used for debugging purposes.
private static int
instanceNo
Counter for handleInstance generation. It is used for debugging purposes.
Constructors Summary
Handle(int slot, int channel, com.sun.midp.security.SecurityToken token)
Creates a new handle with specified parameters.

param
slot slot number
param
channel channel number
param
token security token

    
                            
          

        this.slot = slot;
        this.channel = channel;
        this.token = token;
        cad = APDUManager.cads[slot];
        FCI = cad.getFCI();
        opened = true;
        this.cardSessionId = cad.getCardSessionId();
        this.handleInstance = instanceNo++;
    
Methods Summary
public byte[]getATR()
Returns ATR of the selected application.

return
byte[] ATR.

        return cad.getATR();
    
public intgetCardSessionId()
Returns the card session identifier. This number is different for different card sessions.

return
the card session identifier

        return cad.getCardSessionId();
    
public byte[]getFCI()
Returns FCI of the selected application.

return
byte[] FCI.

        return cad.getFCI();