com.ibm.opencard.isofs
Class MFCFileSystem
java.lang.Object
|
+--opencard.core.service.CardService
|
+--com.ibm.opencard.service.MFCCardService
|
+--com.ibm.opencard.isofs.MFCFileAccess
|
+--com.ibm.opencard.isofs.MFCFileSystem
- public class MFCFileSystem
- extends MFCFileAccess
- implements FileSystemCardService
A file system service for MFC smartcards.
The file system service extends the file service by creational operations,
for example to create or invalidate files.
- Version:
- $Id: MFCFileSystem.java,v 1.1 1999/12/02 16:06:05 damke Exp $
|
Constructor Summary |
MFCFileSystem()
Creates a new MFC file system card service.
|
| Methods inherited from class com.ibm.opencard.isofs.MFCFileAccess |
appendRecord,
decrease,
exists,
getFileInfo,
increase,
initFileAccess,
read,
readRecord,
readRecords,
selectFile,
write,
write,
writeRecord |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MFCFileSystem
public MFCFileSystem()
- Creates a new MFC file system card service.
Before the service can actually be used, it has to be initialized by
invoking initialize. If this service has to be initialized
as part of a derived service, initialization has to be done by invoking
initFileSystem instead.
initialize
protected void initialize(CardServiceScheduler scheduler,
SmartCard smartcard,
boolean blocking)
throws CardServiceException
- Initializes this service.
This is an entry point for initializing the MFC file access card
service. It invokes initFileSystem to perform the actual
initialization. Derived services must not invoke this method, but
have to invoke initFileSystem directly.
- Parameters:
scheduler - where to allocate channelssmartcard - which smartcard to contactblocking - whether operation shall be blocking- Overrides:
- initialize in class MFCFileAccess
- See Also:
initFileSystem(com.ibm.opencard.isofs.MFCFileSysParameter),
MFCCardService.initialize(opencard.core.service.CardServiceScheduler, opencard.core.service.SmartCard, boolean)
initFileSystem
public final void initFileSystem(MFCFileSysParameter parameter)
throws CardServiceException
- Initializes this service from encapsulated parameters.
This method initializes the local attributes and invokes
initFileAccess in the base class.
- Parameters:
parameter - an object encapsulating the parameters to this service- Throws:
- CardServiceException - if the initialization failed.
With the current implementation, this cannot happen.
- See Also:
MFCFileSysParameter,
MFCFileAccess.initFileAccess(com.ibm.opencard.isofs.MFCFileParameter)
create
public void create(CardFilePath parent,
byte[] header)
throws CardServiceException,
CardTerminalException
- Creates a file on the smartcard.
The file may be an elementary or dedicated file.
The information required to create the file is encoded in the
file header. The encoding is card-specific.
- Specified by:
- create in interface FileSystemCardService
- Parameters:
parent - the path of the directory to create the file inheader - the header of the file to create- Throws:
- CardServiceException - if the service encountered an error
- CardTerminalException - if the terminal encountered an error
delete
public void delete(CardFilePath file)
throws CardServiceException,
CardTerminalException
- Specified by:
- delete in interface FileSystemCardService
invalidate
public void invalidate(CardFilePath file)
throws CardServiceException,
CardTerminalException
- Invalidates a file on the smartcard.
The file may be an elementary or dedicated file.
- Specified by:
- invalidate in interface FileSystemCardService
- Parameters:
file - the file to invalidate- Throws:
- CardServiceException - if the service encountered an error
- CardTerminalException - if the terminal encountered an error
rehabilitate
public void rehabilitate(CardFilePath file)
throws CardServiceException,
CardTerminalException
- Specified by:
- rehabilitate in interface FileSystemCardService
|