OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

opencard.tests.testframe
Class InitCard

java.lang.Object
  |
  +--opencard.tests.testframe.InitCard

public class InitCard
extends java.lang.Object
implements CTListener

This class encapsulates functionality for initializing a smart card with the MFCScriptCardService


Method Summary
 void cardInserted(CardTerminalEvent ctEvent)
          React on card inserted events sent by OCF: Get new card
 boolean cardPresent()
          Check presence of an (eventually uninitialized) smart card.
 void cardRemoved(CardTerminalEvent ctEvent)
          React on card removed events sent by OCF: Invalidate card
 boolean initialize(java.lang.String scriptname)
          Initialize a smart card with the image.
 Script instScr(java.lang.String ScriptClass)
          Instantiate a java script file
static void main(java.lang.String[] args)
          the file access card service used to access files on the card
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
the file access card service used to access files on the card

cardRemoved

public void cardRemoved(CardTerminalEvent ctEvent)
React on card removed events sent by OCF: Invalidate card
Specified by:
cardRemoved in interface CTListener
Parameters:
ctEvent - The card inserted event.

cardInserted

public void cardInserted(CardTerminalEvent ctEvent)
React on card inserted events sent by OCF: Get new card
Specified by:
cardInserted in interface CTListener
Parameters:
ctEvent - The card inserted event.

cardPresent

public boolean cardPresent()
Check presence of an (eventually uninitialized) smart card.
Returns:
true, if a smart card is present in a slot, false otherwise

initialize

public boolean initialize(java.lang.String scriptname)
Initialize a smart card with the image.
Returns:
true on success, false on failure.

instScr

public Script instScr(java.lang.String ScriptClass)
Instantiate a java script file
Parameters:
ScriptFileClass - The name of the script file class to instantiate
Returns:
Script instantiated script object