Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.cardcontact.opencard.service.isocard
Interface IsoFileSystemCardService

All Superinterfaces:
  CardServiceInterface, FileAccessCardService, FileSystemCardService, SecureService

All Known Implementing Classes:
  ACOSCardService, IsoCardService

    public interface IsoFileSystemCardService

extends FileSystemCardService

This interface extents the original interface in the signature for the create() and delete() method to allow better compatibility with ISO 7816-9 smart cards.

Author:
  Andreas Schwier (info@cardcontact.de)

Field Summary

Fields inherited from interface opencard.opt.iso.fs.FileAccessCardService
`READ_SEVERAL`

Method Summary
`void` | `create(CardFilePath parent, byte fileDescriptorByte, byte shortFileIdentifier, byte[] data)` Creates a file on the smartcard.
`void` | `delete(CardFilePath file, CardFilePathComponent child, boolean childIsDF)` Deletes a file on the smartcard.

Methods inherited from interface opencard.opt.iso.fs.FileSystemCardService
`create, delete, invalidate, rehabilitate`

Methods inherited from interface opencard.opt.iso.fs.FileAccessCardService
`appendRecord, exists, getFileInfo, getRoot, read, readRecord, readRecords, write, write, writeRecord`

Methods inherited from interface opencard.opt.service.CardServiceInterface
`getCard, setCHVDialog`

Methods inherited from interface opencard.opt.security.SecureService
`provideCredentials`

Method Detail

### create

    void create(CardFilePath parent,
                byte fileDescriptorByte,
                byte shortFileIdentifier,
                byte[] data)
                throws CardServiceException,
                       CardTerminalException

  Creates a file on the smartcard. This method is an extension to the method originally defined by OCF. It allows the caller to specify P1 and P2 in the command APDU as defined by ISO 7816-9.
  Creating files is a card-specific operation. While the ISO file types are specified, the access conditions that can be defined are not. When creating a file, the access conditions to the new file have to be given. The result is that no card-independent arguments to a `create` method can be specified.
  This method defines only a card-neutral signature by expecting a byte array as a parameter. The data to be stored in that byte array is card-specific. It is suggested, but not required, that a file header, as it is returned by `CardFileInfo.getHeader`, is accepted as that parameter block. A file header typically holds all information needed for creating a file, in a card-specific encoding. This information includes the file ID, structure, size, and the access conditions.

  This method is intended to be used in a scenario where new applications have to be downloaded on a smartcard. Typically, a server will be contacted to retrieve the information about the directories and files that have to be created. This server can be supplied with the card's ATR, which is encapsulated by class `CardID`. The server will then be able to send parameter blocks that are appropriate arguments for this method and the respective card.

  Parameters:
    `parent` - the path to the directory in which to create a new file
    `fileDescriptorByte` - File descriptor byte according to ISO 7816-4
    `shortFileIdentifier` - Short file identifer coded on bit b8 - b4
    `data` - the parameters specifying the file to create. This argument is card-specific. Refer to the documentation of the card-specific service for details.
  Throws:
    `CardServiceException` - if the service encountered an error
    `CardTerminalException` - if the terminal encountered an error
  See Also:
    `FileSystemCardService`, `FileAccessCardService.getFileInfo(opencard.opt.iso.fs.CardFilePath)`, `CardFileInfo.getHeader()`, `CardID`, `SmartCard.getCardID()`

### delete

    void delete(CardFilePath file,
                CardFilePathComponent child,
                boolean childIsDF)
                throws CardServiceException,
                       CardTerminalException

  Deletes a file on the smartcard. This method is an extension to the original method defined by OCF. It allows to delete an object from within a selected DF. The implementation therefore allows to differentiate between a "delete child" and a "delete self" operation which may have different access conditions. Deleting a file completely removes it from the smartcard. The associated resources on the card, that is the allocated memory, will be freed. It is not possible to restore the file. A new file with the same id as the deleted file may be created in the same directory (DF).

  Parameters:
    `file` - the path to the file to delete
    `child` - File identifier of child object (either EF, DF or application)
    `childIsDF` - True, if the child is a dedicated file
  Throws:
    `CardServiceException` - if the service encountered an error
    `CardTerminalException` - if the terminal encountered an error

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD