Class IsoFileControlInformation
- java.lang.Object
-
- de.cardcontact.opencard.service.isocard.IsoFileControlInformation
-
- All Implemented Interfaces:
CardFileInfo
public class IsoFileControlInformation extends java.lang.Object implements CardFileInfo
Parser to TLV-encoded file control information returned in SELECT APDU- Author:
- Andreas Schwier
-
-
Constructor Summary
Constructors Constructor Description IsoFileControlInformation()IsoFileControlInformation(byte[] newfci)Create file control information from TLV coded byte array
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetFileID()Returns the identifier of the file.byte[]getHeader()Returns the file header.intgetLength()Returns the length of the file.byte[]getProprietary()Return proprietary dataintgetRecordSize()Returns the record size of the file.booleanisCyclic()Tests whether the file is a cyclic file.booleanisDirectory()Tests whether the file is a DF.booleanisTransparent()Tests whether the file is a transparent file.booleanisVariable()Tests whether the file is a variable record file.
-
-
-
Method Detail
-
getFileID
public short getFileID()
Description copied from interface:CardFileInfoReturns the identifier of the file. It is most likely that this method is of no particular use, but since the file identifier is the most basic information about a file at all, it is included here anyway.- Specified by:
getFileIDin interfaceCardFileInfo- Returns:
- the identifier of the file
-
isDirectory
public boolean isDirectory()
Description copied from interface:CardFileInfoTests whether the file is a DF.- Specified by:
isDirectoryin interfaceCardFileInfo- Returns:
- true if the file is a DF, false otherwise
-
isTransparent
public boolean isTransparent()
Description copied from interface:CardFileInfoTests whether the file is a transparent file. The value returned is valid only if the file is not a DF, that is if isDirectory returns false.- Specified by:
isTransparentin interfaceCardFileInfo- Returns:
- true if the file is a transparent file
- See Also:
CardFileInfo.isDirectory()
-
isCyclic
public boolean isCyclic()
Description copied from interface:CardFileInfoTests whether the file is a cyclic file. The value returned is valid only if the file is not a DF and not a transparent file, that is if isDirectory as well as isTransparent return false.- Specified by:
isCyclicin interfaceCardFileInfo- Returns:
- true if the file is a cyclic file
- See Also:
CardFileInfo.isDirectory(),CardFileInfo.isTransparent()
-
isVariable
public boolean isVariable()
Description copied from interface:CardFileInfoTests whether the file is a variable record file. The value returned is valid only if the file is not a DF and not a transparent file, that is if isDirectory as well as isTransparent return false.- Specified by:
isVariablein interfaceCardFileInfo- Returns:
- true if the file is a structured file with variable record size
- See Also:
CardFileInfo.isDirectory(),CardFileInfo.isTransparent()
-
getLength
public int getLength()
Description copied from interface:CardFileInfoReturns the length of the file. If the file is a transparent file, that is if isDirectory returns false and isTransparent returns true, this method returns the number of bytes in the file.
If the file is a structured file with fixed record length, either cyclic or non-cyclic, this method returns also returns the number of bytes in the file, that is the size of a record multiplied by the number of bytes in a record.
If the file is a DF, a structured file with variable record length, or some card specific file type, the value returned by this method is implementation dependent.- Specified by:
getLengthin interfaceCardFileInfo- Returns:
- the number of bytes in the file
- See Also:
CardFileInfo.isDirectory(),CardFileInfo.isTransparent()
-
getRecordSize
public int getRecordSize()
Description copied from interface:CardFileInfoReturns the record size of the file. The value returned is valid only if the file is a structured file with fixed record size, that is if isDirectory, isTransparent and isVariable return false.- Specified by:
getRecordSizein interfaceCardFileInfo- Returns:
- the size of a record of the file
- See Also:
CardFileInfo.isDirectory(),CardFileInfo.isTransparent(),CardFileInfo.isVariable()
-
getHeader
public byte[] getHeader()
Description copied from interface:CardFileInfoReturns the file header. This method actually returns the smartcard's response (or expected response) to a selection of the file. For an EF, this is the file header which may have been expanded by some application data, if the card OS allows to do so. For a DF, this is the file header, also optionally expanded, or some other data that has been defined as the select response for the DF. The EMV standard requires the select response for a DF to be defineable by applications.
This method is not invoked by the OpenCard Framework, and it is not yet clear whether it will be useful for applications. However, removing a method from this interface will be easier than adding it later, so it is currently required. File services that do not want to support this method may simply return null.- Specified by:
getHeaderin interfaceCardFileInfo- Returns:
- the smartcard's response to a selection of the file, or null if not supported
-
getProprietary
public byte[] getProprietary()
Return proprietary data
-
-