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

opencard.tests.service
Class DeleteFile

java.lang.Object
  |
  +--opencard.tests.testframe.TestCase
        |
        +--opencard.tests.service.DeleteFile

public class DeleteFile
extends TestCase
implements java.lang.Runnable

The test try to delete a file on the card. If the program run without parameters then one thread is started with fixed parameters. The tested card's layout is in the subdirectory testlay/lay-40a. The corresponding card's layout must be on the card to run the program with parameters: java DeleteFile


Constructor Summary
DeleteFile()
           
DeleteFile(java.lang.String FileID, java.lang.String DirID)
          Instantiates a test to delete a file.
 
Method Summary
 boolean delete(java.lang.String FileID, java.lang.String DirID)
          Delete a file or directory on the SmartCard.
static int getRetCode()
           
static void main(java.lang.String[] args)
          Starts the program, evaluates the arguments and initializes the parameters.
 void run()
          Performs the call of the delete method and evaluates the return value.
static void setRetCode(int rc)
           
 int start(java.lang.String[] args)
           
 
Methods inherited from class opencard.tests.testframe.TestCase
getTestFrameReference, setTestFrameReference, showActionRequired, showError, showInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteFile

public DeleteFile()

DeleteFile

public DeleteFile(java.lang.String FileID,
                  java.lang.String DirID)
Instantiates a test to delete a file.
Parameters:
FileID - File to be deleted (e.g. 1003 - File 1003 will be deleted)
DirID - Directory of the File to be deleted (e.g. 1000 - File in Directory 1000 will be deleted)
Method Detail

main

public static void main(java.lang.String[] args)
Starts the program, evaluates the arguments and initializes the parameters.

start

public int start(java.lang.String[] args)
Overrides:
start in class TestCase

run

public void run()
Performs the call of the delete method and evaluates the return value.
Specified by:
run in interface java.lang.Runnable

delete

public boolean delete(java.lang.String FileID,
                      java.lang.String DirID)
Delete a file or directory on the SmartCard.

Parameters:
FileID - File to be deleted (e.g. 1003 - File 1003 will be deleted)
DirID - Directory of the File to be deleted (e.g. 1000 - File in Directory 1000 will be deleted)

setRetCode

public static void setRetCode(int rc)

getRetCode

public static int getRetCode()