JavaCardInterface



com.licel.jcardsim.io
Interface JavaCardInterface

All Superinterfaces:
CardInterface
All Known Implementing Classes:
JavaCardRemoteClient, JavaxSmartCardInterface, Simulator

public interface JavaCardInterface
extends CardInterface

Interface with JavaCard-specific functions


Method Summary
 AID createApplet(AID aid, byte[] bArray, short bOffset, byte bLength)
          Create Applet instance in Simulator
 AID installApplet(AID aid, String appletClassName, byte[] appletJarContents, byte[] bArray, short bOffset, byte bLength)
          Install Applet into Simulator.
 AID installApplet(AID aid, String appletClassName, byte[] bArray, short bOffset, byte bLength)
          Install Applet into Simulator.
 AID loadApplet(AID aid, String appletClass)
          Load Applet into Simulator
 AID loadApplet(AID aid, String appletClassName, byte[] appletJarContents)
          Load Applet into Simulator
 boolean selectApplet(AID aid)
          Select applet by it's AID It's method must be called before start working with applet instance
 
Methods inherited from interface com.licel.jcardsim.io.CardInterface
getATR, reset, transmitCommand
 

Method Detail

loadApplet

AID loadApplet(AID aid,
               String appletClassName,
               byte[] appletJarContents)
               throws SystemException
Load Applet into Simulator

Parameters:
aid - applet aid
appletClassName - fully qualified applet class name Strin
appletJarContents - contains a byte array containing a jar file with an applet and its dependent classes
Returns:
applet AID
Throws:
SystemException - if appletClass not instanceof javacard.framework.Applet

loadApplet

AID loadApplet(AID aid,
               String appletClass)
Load Applet into Simulator

Parameters:
aid - applet aid
appletClassName - fully qualified applet class name Strin
Returns:
applet AID
Throws:
SystemException - if appletClass not instanceof javacard.framework.Applet

createApplet

AID createApplet(AID aid,
                 byte[] bArray,
                 short bOffset,
                 byte bLength)
                 throws SystemException
Create Applet instance in Simulator

Parameters:
aid - applet aid
bArray - the array containing installation parameters
bOffset - the starting offset in bArray
bLength - the length in bytes of the parameter data in bArray
Returns:
applet AID
Throws:
SystemException - if exception in Applet.install(..) method occurs.

installApplet

AID installApplet(AID aid,
                  String appletClassName,
                  byte[] bArray,
                  short bOffset,
                  byte bLength)
                  throws SystemException
Install Applet into Simulator. This method is equal to: loadApplet(...); createApplet(...);

Parameters:
aid - applet aid or null
appletClassName - fully qualified applet class name Strin
bArray - the array containing installation parameters
bOffset - the starting offset in bArray
bLength - the length in bytes of the parameter data in bArray
Returns:
applet AID
Throws:
SystemException - if appletClass not instanceof javacard.framework.Applet

installApplet

AID installApplet(AID aid,
                  String appletClassName,
                  byte[] appletJarContents,
                  byte[] bArray,
                  short bOffset,
                  byte bLength)
                  throws SystemException
Install Applet into Simulator. This method is equal to: loadApplet(...); createApplet(...);

Parameters:
aid - applet aid or null
appletClassName - fully qualified applet class name Strin
appletJarContents - Contains a byte array containing a jar file with an applet and its dependent classes
bArray - the array containing installation parameters
bOffset - the starting offset in bArray
bLength - the length in bytes of the parameter data in bArray
Returns:
applet AID
Throws:
SystemException - if appletClass not instanceof javacard.framework.Applet

selectApplet

boolean selectApplet(AID aid)
Select applet by it's AID It's method must be called before start working with applet instance

Parameters:
aid - appletId
Returns:
true if applet selection success