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

com.ibm.opencard.isofs
Class MFC35FileSystemImpl

java.lang.Object
  |
  +--com.ibm.opencard.isofs.MFC35FileSystemImpl

public class MFC35FileSystemImpl
extends java.lang.Object
implements MFCFileSystemImpl

Implementation of a file system card service for MFC 3.5 and some other. The file system service provides creational operations, like creating, deleting or invalidating files on the smartcard.

Version:
$Id: MFC35FileSystemImpl.java,v 1.1 1999/12/02 16:06:04 damke Exp $

Field Summary
protected  MFCCodes mfc_codes
          The CLAss and INStruction bytes for commands.
 
Constructor Summary
MFC35FileSystemImpl(MFCCodes codes)
          Instantiates a new file system service for MFC 3.5 and above smartcards.
 
Method Summary
 void createFile(MFCCardChannel channel, byte[] header)
          Creates a file on the smartcard.
 void deleteFile(MFCCardChannel channel, short file)
          Deletes a file on the smartcard.
 void invalidateFile(MFCCardChannel channel)
          Invalidates a file on the smartcard.
 void rehabilitateFile(MFCCardChannel channel)
          Rehabilitates a file on the smartcard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mfc_codes

protected MFCCodes mfc_codes
The CLAss and INStruction bytes for commands.
Constructor Detail

MFC35FileSystemImpl

public MFC35FileSystemImpl(MFCCodes codes)
Instantiates a new file system service for MFC 3.5 and above smartcards.
Parameters:
codes - the command codes for the MFC card to support
Method Detail

createFile

public void createFile(MFCCardChannel channel,
                       byte[] header)
                throws CardServiceException,
                       CardTerminalException
Creates a file on the smartcard. The directory in which the file should be created has to be selected. The file itself may be an elementary or dedicated file. All information required to create the file is encoded in that header. The encoding is card-specific.
Specified by:
createFile in interface MFCFileSystemImpl
Parameters:
channel - the contact to the smartcard
header - the header of the file to create
Throws:
CardServiceException - if the service encountered an error
CardTerminalException - if the terminal encountered an error

deleteFile

public void deleteFile(MFCCardChannel channel,
                       short file)
                throws CardServiceException,
                       CardTerminalException
Deletes a file on the smartcard. The parent directory of the file has to be selected.
Specified by:
deleteFile in interface MFCFileSystemImpl
Parameters:
channel - how to contact the smartcard
file - the ID of the file to delete
Throws:
CardServiceException - if the service encountered an error
CardTerminalException - if the terminal encountered an error

invalidateFile

public void invalidateFile(MFCCardChannel channel)
                    throws CardServiceException,
                           CardTerminalException
Invalidates a file on the smartcard. The file has to be selected. It has to be valid.
Specified by:
invalidateFile in interface MFCFileSystemImpl
Parameters:
channel - how to contact the smartcard
Throws:
CardServiceException - if the service encountered an error
CardTerminalException - if the terminal encountered an error

rehabilitateFile

public void rehabilitateFile(MFCCardChannel channel)
                      throws CardServiceException,
                             CardTerminalException
Rehabilitates a file on the smartcard. The file has to be selected. It has to be invalid.
Specified by:
rehabilitateFile in interface MFCFileSystemImpl
Parameters:
channel - how to contact the smartcard
Throws:
CardServiceException - if the service encountered an error
CardTerminalException - if the terminal encountered an error