com.ibm.opencard.isofs
Class MFC35FileSRParser
java.lang.Object
|
+--com.ibm.opencard.service.MFC35ObjectSRParser
|
+--com.ibm.opencard.isofs.MFC35FileSRParser
- public class MFC35FileSRParser
- extends MFC35ObjectSRParser
A select response parser for file select commands.
This parser decodes the information contained in a typical MFC
select response to a file or directory. Unlike the generic class
MFC35ObjectSRParser, it does not only decode the access
information, but also the file or directory specific information,
like file size or structure. It does not decode additional data
that is sent when selecting special files like EF_CHV1.
The name of this class, indicating MFC 3.5 support, may be a bit
misleading. This parser also recognizes files types that are not
supported by this CardOS version, like variable record files. The
corresponding codes had been reserved, so there is no compatibility
problem.
- Version:
- $Id: MFC35FileSRParser.java,v 1.1 1999/12/02 16:06:04 damke Exp $
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FT_EF_TRANSPARENT
protected static final byte FT_EF_TRANSPARENT
FT_EF_FIXED
protected static final byte FT_EF_FIXED
FT_EF_VARIABLE
protected static final byte FT_EF_VARIABLE
FT_EF_CYCLIC
protected static final byte FT_EF_CYCLIC
FT_EF_RFU4
protected static final byte FT_EF_RFU4
FT_EF_RFU5
protected static final byte FT_EF_RFU5
FT_EF_ASC
protected static final byte FT_EF_ASC
MFC35FileSRParser
public MFC35FileSRParser(MFCAccessParser accpar)
- Creates a new select response parser for file and directory selects.
- Parameters:
accpar - a parser for access conditions, which are part
of the file or directory select response
parseSelectResponse
public MFCCardObjectInfo parseSelectResponse(byte[] response)
throws BadHeaderException
- Interpret a smartcard's response to a select command.
This method is required in the interface MFCSelectResponseParser.
The implementation here parses the access conditions as well as file or
directory specific information like the size or file structure.
- Parameters:
response - the response data sent by the smartcard- Returns:
- the file information gathered from the smartcard's response
- Throws:
- BadHeaderException - The response could not be parsed correctly.
- Overrides:
- parseSelectResponse in class MFC35ObjectSRParser
parseFileHeader
protected void parseFileHeader(MFCFileInfo info,
byte[] header)
throws BadHeaderException
- Parse a file header and set up file information accordingly.
This method parses only the file part of the information. The generic
part must be interpreted before or afterwards, preferrably before.
the base class provides the method parseObjectHeader for
this purpose.
This method must be invoked exactly once for a particular
file info object. Before invocation, the file info is not set up
appropriately. It is not possible to reuse a file info object by
invoking this method a second time with a different header.
- Parameters:
info - the file info to set upheader - the file header obtained from the smartcard- Throws:
- BadHeaderException - if the header could not be parsed correctly
|