com.ibm.jc
Class LoadFile

java.lang.Object
  extended bycom.ibm.jc.JCApplet
      extended bycom.ibm.jc.LoadFile

public class LoadFile
extends JCApplet

This class implements the off-card behavior of an Executable Load File (package) on a Global Platform JavaCard.


Field Summary
static int DELETED
          Deprecated.  
static int LOADED
          Executable Load file life cycle state
static int NOT_AVAILABLE
          Executable Load file life cycle state (proprietary)
 
Fields inherited from class com.ibm.jc.JCApplet
apdu
 
Constructor Summary
LoadFile(JCard card, byte[] aid, int aidBeg, int aidLen)
          Create the off-card representation of an Executable Load File on a Global Platform JavaCard.
LoadFile(JCard card, byte[] aid, int aidBeg, int aidLen, int state)
          Create the off-card representation of an Executable Load File on a Global Platform JavaCard.
LoadFile(JCard card, byte[] aid, int aidBeg, int aidLen, int state, byte[][] modules)
          Create the off-card representation of an Executable Load File on a Global Platform JavaCard.
 
Method Summary
 byte[][] getModules()
          Retrieve list of Executable Modules.
 int getState()
           
 byte[] select()
          A Load File cannot be selected.
protected  void setHeader(int cla, int ins, int p1, int p2)
          A Load File does not have an APDU buffer.
 void setModules(byte[][] modules)
          Set list of Executable Modules.
 void setState(int s)
           
 
Methods inherited from class com.ibm.jc.JCApplet
equals, flush, getAID, getCard, getTerminal, setAID, setCard
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_AVAILABLE

public static final int NOT_AVAILABLE
Executable Load file life cycle state (proprietary)

See Also:
Constant Field Values

LOADED

public static final int LOADED
Executable Load file life cycle state

See Also:
Constant Field Values

DELETED

public static final int DELETED
Deprecated.  

Executable Load file life cycle state

See Also:
Constant Field Values
Constructor Detail

LoadFile

public LoadFile(JCard card,
                byte[] aid,
                int aidBeg,
                int aidLen)
Create the off-card representation of an Executable Load File on a Global Platform JavaCard.

Parameters:
card - the JavaCard the Load File resides on.
aid - the buffer containing the AID of the Load File.
aidBeg - offset into aid
aidLen - the length of the Load File AID. This value must be in the range [5;16].
Throws:
JCException - if the AID is too short/long or if card is null.

LoadFile

public LoadFile(JCard card,
                byte[] aid,
                int aidBeg,
                int aidLen,
                int state)
Create the off-card representation of an Executable Load File on a Global Platform JavaCard.

Parameters:
card - the JavaCard the Load File resides on.
aid - the buffer containing the AID of the Load File.
aidBeg - offset into aid
aidLen - the length of the Load File AID. This value must be in the range [5;16].
state - the life cycle state of the Load File.
Throws:
JCException - if the AID is too short/long or if card is null.
See Also:
LOADED, NOT_AVAILABLE, DELETED

LoadFile

public LoadFile(JCard card,
                byte[] aid,
                int aidBeg,
                int aidLen,
                int state,
                byte[][] modules)
Create the off-card representation of an Executable Load File on a Global Platform JavaCard.

Parameters:
card - the JavaCard the Load File resides on.
aid - the buffer containing the AID of the Load File.
aidBeg - offset into aid
aidLen - the length of the Load File AID. This value must be in the range [5;16].
state - the life cycle state of the Load File.
modules - AIDs of Executable Modules within this Load File. Might be null.
Throws:
JCException - if the AID is too short/long or if card is null.
See Also:
LOADED, NOT_AVAILABLE, DELETED
Method Detail

getModules

public byte[][] getModules()
Retrieve list of Executable Modules.

Returns:
list of AIDs of Executable Modules within this Load File. Might be null.
See Also:
setModules

setModules

public void setModules(byte[][] modules)
Set list of Executable Modules.

See Also:
getModules

getState

public int getState()
Returns:
the Load File life cycle state.
See Also:
NOT_AVAILABLE, LOADED, DELETED

setState

public void setState(int s)
Parameters:
s - the state to be set.
Returns:
sets the Load File life cycle state.
See Also:
NOT_AVAILABLE, LOADED, DELETED

select

public byte[] select()
A Load File cannot be selected. A JCException will be thrown.

Overrides:
select in class JCApplet
Returns:
response APDU.

setHeader

protected void setHeader(int cla,
                         int ins,
                         int p1,
                         int p2)
A Load File does not have an APDU buffer. A JCException will be thrown.

Overrides:
setHeader in class JCApplet