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

opencard.tests.service
Class GetFileSize

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

public class GetFileSize
extends TestCase
implements java.lang.Runnable

The test try to find out the size of a file on the card. If the program run without parameters then three threads are started. Each thread gets the size of a file on the card. 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 GetFileSize


Constructor Summary
GetFileSize()
           
GetFileSize(java.lang.String FileID)
          Instantiates a test to get the size of a file.
 
Method Summary
 long getFileSize(java.lang.String FileID)
          Get FileSize of a File on the SmartCard.
static int getRetCode()
           
static void main(java.lang.String[] args)
          Starts the program and evaluates the parameters.
 void run()
          Performs the call of the getFileSize 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

GetFileSize

public GetFileSize()

GetFileSize

public GetFileSize(java.lang.String FileID)
Instantiates a test to get the size of a file.
Parameters:
FileID - File to get the size from(e.g. :1000:1003 - File 1003 in the Directory 1000 will be read)
Method Detail

main

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

start

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

run

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

getFileSize

public long getFileSize(java.lang.String FileID)
Get FileSize of a File on the SmartCard.

Parameters:
FileID - File to get the size from(e.g. :1000:1003 - File 1003 in the Directory 1000 will be read)

setRetCode

public static void setRetCode(int rc)

getRetCode

public static int getRetCode()