net.sourceforge.scuba.smartcards
Class AbstractFileSystemStructured
java.lang.Object
net.sourceforge.scuba.smartcards.AbstractFileSystemStructured
- All Implemented Interfaces:
- FileSystemStructured
public abstract class AbstractFileSystemStructured
- extends Object
- implements FileSystemStructured
This class implements some basic file selection / reading / writing
routines from the ISO7816-4 standard.
TODO: Work in heavy progress
- Author:
- woj
|
Field Summary |
static short |
MF_ID
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MF_ID
public static short MF_ID
AbstractFileSystemStructured
public AbstractFileSystemStructured(CardService service)
AbstractFileSystemStructured
public AbstractFileSystemStructured(CardService service,
boolean fileInfo)
getFileLength
public int getFileLength()
throws CardServiceException
- Throws:
CardServiceException
getSelectedFID
public short getSelectedFID()
readBinary
public byte[] readBinary(int offset,
int length)
throws CardServiceException
- Description copied from interface:
FileSystemStructured
- Reads a fragment of the currently selected file.
- Specified by:
readBinary in interface FileSystemStructured
- Parameters:
offset - offsetlength - 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)
selectFile
public void selectFile(short fid)
throws CardServiceException
- Description copied from interface:
FileSystemStructured
- Selects a file.
- Specified by:
selectFile in interface FileSystemStructured
- Parameters:
fid - indicates which file to select
- Throws:
CardServiceException - in case of error
selectMF
public void selectMF()
throws CardServiceException
- Throws:
CardServiceException
selectParent
public void selectParent()
throws CardServiceException
- Throws:
CardServiceException
selectEFRelative
public void selectEFRelative(short fid)
throws CardServiceException
- Throws:
CardServiceException
selectDFRelative
public void selectDFRelative(short fid)
throws CardServiceException
- Throws:
CardServiceException
selectAID
public void selectAID(byte[] aid)
throws CardServiceException
- Throws:
CardServiceException
selectPath
public void selectPath(byte[] path)
throws CardServiceException
- Throws:
CardServiceException
selectPathRelative
public void selectPathRelative(byte[] path)
throws CardServiceException
- Throws:
CardServiceException