JMRTD 0.4.5

net.sourceforge.scuba.smartcards
Interface FileSystemStructured

All Known Implementing Classes:
AbstractFileSystemStructured

public interface FileSystemStructured

Interface for minimal ISO file systems. Implement this interface to tell CardFileInputStream how to deal with card files.

Author:
Martijn Oostdijk (martijn.oostdijk@gmail.com)

Method Summary
 FileInfo[] getSelectedPath()
          Identifies the currently selected file.
 byte[] readBinary(int offset, int length)
          Reads a fragment of the currently selected file.
 void selectFile(short fid)
          Selects a file.
 

Method Detail

selectFile

void selectFile(short fid)
                throws CardServiceException
Selects a file.

Parameters:
fid - indicates which file to select
Throws:
CardServiceException - in case of error

readBinary

byte[] readBinary(int offset,
                  int length)
                  throws CardServiceException
Reads a fragment of the currently selected file.

Parameters:
offset - offset
length - the number of bytes to read (the result may be shorter, though)
Returns:
contents of currently selected file, contains at least 1 byte, at most length.
Throws:
CardServiceException - on error (for instance: end of file)

getSelectedPath

FileInfo[] getSelectedPath()
Identifies the currently selected file.

Returns:
a path of file identifiers or null.

JMRTD 0.4.5