public interface FileView
extends javacard.framework.Shareable
FileView interface defines the methods to access a UICC file system.
UICCSystem| Modifier and Type | Method and Description |
|---|---|
void |
activateFile()
This method activates a deactivated EF.
|
void |
deactivateFile()
This method deactivates the currently selected EF.
|
short |
increase(byte[] incr,
short incrOffset,
short incrLength,
byte[] resp,
short respOffset)
This method increases the current cyclic EF record, as defined in TS 102 221.In addition to the behaviour defined in TS 102 221,
the following rule applies: If the parameter incrLength is set to 0, the current value of the last increased or updated record
is stored into the oldest record of the current cyclic EF.
|
short |
readBinary(short fileOffset,
byte[] resp,
short respOffset,
short respLength)
This method reads the data bytes of the current transparent EF.
|
short |
readRecord(short recNumber,
byte mode,
short recOffset,
byte[] resp,
short respOffset,
short respLength)
This method reads a record or a part of a record of the current linear fixed/cyclic EF
of the calling applet into the given byte array.
|
short |
searchRecord(byte mode,
short recordNum,
short searchIndication,
byte[] patt,
short pattOffset,
short pattLength,
short[] response,
short respOffset,
short respLength)
This method searches a pattern in the current linear fixed/cyclic EF.
|
void |
select(byte sfi)
This method selects a file by SFI in the current directory of the FileView.
|
void |
select(short fid)
This method selects a file of the UICC file system or of an ADF file system.
|
short |
select(short fid,
byte[] fcp,
short fcpOffset,
short fcpLength)
This method selects a file of the UICC file system or of an ADF file system.
|
short |
status(byte[] fcp,
short fcpOffset,
short fcpLength)
This method returns the FCP (File Control Parameter) of the current selected DF.
|
void |
updateBinary(short fileOffset,
byte[] data,
short dataOffset,
short dataLength)
This method updates the data bytes of the current transparent EF.
|
void |
updateRecord(short recNumber,
byte mode,
short recOffset,
byte[] data,
short dataOffset,
short dataLength)
This method updates the data bytes of the record of the current linear fixed/cyclic EF.
|
short select(short fid,
byte[] fcp,
short fcpOffset,
short fcpLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
fcpOffset or fcpLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
fcpOffset+fcpLength is greater than fcp.length, the length
of the fcp array a ArrayIndexOutOfBoundsException exception is thrown
and no status is performed.
fid - is the File Identifier of the file to be selected.fcp - is the reference to the target byte array for information of current file, coding is according to TS 102.221.fcpOffset - is the offset in the fcp buffer for the response data.fcpLength - is the length of the required data in the fcp byte array.
If the fcpLength is greater than the length of the response, the whole
response is copied into the fcp buffer and the length of the response
is returned by the method. If the fcpLength is smaller than the length
of the response, the first part of the response is copied into the fcp
buffer and the fcpLength is returned by the method.fcp buffer
(cannot be greater than fcpLength parameter)java.lang.NullPointerException - if fcp is nulljava.lang.ArrayIndexOutOfBoundsException - if operation would cause access of data outside
array bounds.UICCException - in case of errorFILE_NOT_FOUND
MEMORY_PROBLEM
INTERNAL_ERROR
CONDITIONS_OF_USE_NOT_SATISFIEDvoid select(short fid)
throws UICCException
fid - is the File Identifier of the file to be selected.UICCException - in case of errorFILE_NOT_FOUND
MEMORY_PROBLEM
INTERNAL_ERROR
CONDITIONS_OF_USE_NOT_SATISFIEDvoid select(byte sfi)
throws UICCException
sfi - is the Short File Identifier of the file to be selected.UICCException - in case of errorFILE_NOT_FOUND if a file with the corresponding SFI is not found or if the sfi parameter is invalid.
MEMORY_PROBLEM
INTERNAL_ERROR
CONDITIONS_OF_USE_NOT_SATISFIEDshort status(byte[] fcp,
short fcpOffset,
short fcpLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
fcpOffset or fcpLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
fcpOffset+fcpLength is greater than fcp.length, the length
of the fcp array a ArrayIndexOutOfBoundsException exception is thrown
and no status is performed.
fcp - is the reference to the target byte array for FCP (File Control
Parameter) of current DF (or MF), coding is according to TS 102.221.fcpOffset - is the offset in the fcp buffer for the response data.fcpLength - is the length of the required data in the fcp byte array.
If the fcpLength is greater than the length of the response, the whole
response is copied into the fcp buffer and the length of the response
is returned by the method. If the fcplength is smaller than the length
of the response, the first part of the response is copied into the fcp
buffer and the fcpLength is returned by the method.fcp buffer
(cannot be greater than fcpLength parameter)java.lang.NullPointerException - if fcp is nulljava.lang.ArrayIndexOutOfBoundsException - if operation would cause access of data outside
array bounds.UICCException - in case of error MEMORY_PROBLEM
INTERNAL_ERRORshort readBinary(short fileOffset,
byte[] resp,
short respOffset,
short respLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
respOffset or respLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
respOffset+respLength is greater than resp.length, the length
of the resp array a ArrayIndexOutOfBoundsException exception is thrown
and no read is performed.
fileOffset - is the offset in the source transparent file.resp - is the reference to the response byte array for read data.respOffset - is the offset in the response byte array.respLength - is the number of bytes to read.respOffset+respLengthjava.lang.NullPointerException - if resp is nulljava.lang.ArrayIndexOutOfBoundsException - if reading would cause access of data outside array boundsUICCException - in case of error INTERNAL_ERROR
OUT_OF_FILE_BOUNDARIES
COMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
NO_EF_SELECTED
COMMAND_NOT_ALLOWED if the referenced file is terminatedvoid updateBinary(short fileOffset,
byte[] data,
short dataOffset,
short dataLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
dataOffset or dataLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
dataOffset+dataLength is greater than data.length, the length
of the data array a ArrayIndexOutOfBoundsException exception is thrown
and no update is performed.
fileOffset - is the offset in the destination transparent file.data - is the reference to the source byte array for data to update.dataOffset - is the offset in the data byte array.dataLength - is the number of bytes to update.java.lang.NullPointerException - if data is nulljava.lang.ArrayIndexOutOfBoundsException - if updating would cause access of data outside array boundsUICCException - in case of errorMEMORY_PROBLEM
INTERNAL_ERROR
COMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
NO_EF_SELECTED
OUT_OF_FILE_BOUNDARIES
COMMAND_NOT_ALLOWED if the referenced file is terminatedshort readRecord(short recNumber,
byte mode,
short recOffset,
byte[] resp,
short respOffset,
short respLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
respOffset or respLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
respOffset+respLength is greater than resp.length, the length
of the resp array a ArrayIndexOutOfBoundsException exception is thrown
and no read is performed.
recNumber - is the record number (for absolute mode only)mode - is the mode for reading recordrecOffset - is the offset in the record for the data to read.resp - is the reference to the response byte array for read data.respOffset - is the offset in the response byte array.respLength - is the number of bytes to read.respOffset+respLengthjava.lang.NullPointerException - if resp is nulljava.lang.ArrayIndexOutOfBoundsException - if reading would cause access of data outside array boundsUICCException - in case of error OUT_OF_RECORD_BOUNDARIES
INTERNAL_ERROR
COMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
NO_EF_SELECTED
INVALID_MODE
RECORD_NOT_FOUND
COMMAND_NOT_ALLOWED if the referenced file is terminatedvoid updateRecord(short recNumber,
byte mode,
short recOffset,
byte[] data,
short dataOffset,
short dataLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
dataOffset or dataLength parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
dataOffset+dataLength is greater than data.length, the length
of the data array a ArrayIndexOutOfBoundsException exception is thrown
and no update is performed.
recNumber - is the record number, if null then mode is usedmode - is the mode for updating record, if recNumber is given then mode is in ABSOLUTE moderecOffset - is the offset in the record for the data to update.data - is the reference to the source byte array for data to update.dataOffset - is the offset in the source byte array.dataLength - is the number of bytes to update.java.lang.NullPointerException - if data is nulljava.lang.ArrayIndexOutOfBoundsException - if updating would cause access of data outside array boundsUICCException - in case of errorCOMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
OUT_OF_RECORD_BOUNDARIES
RECORD_NOT_FOUND
NO_EF_SELECTED
MEMORY_PROBLEM
INVALID_MODE
INTERNAL_ERROR
COMMAND_NOT_ALLOWED if the referenced file is terminatedshort searchRecord(byte mode,
short recordNum,
short searchIndication,
byte[] patt,
short pattOffset,
short pattLength,
short[] response,
short respOffset,
short respLength)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
patOffset or pattLength or respOffset or respLengthparameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
pattOffset+pattLength is greater than patt.length, the length
of the patt array a ArrayIndexOutOfBoundsException exception is thrown
and no search is performed.
respOffset+respLength is greater than response.length, the length
of the response array a ArrayIndexOutOfBoundsException exception is thrown
and no search is performed.
mode - is the search mode, according to TS 102.221 (no type information).recordNum - is the record number to start the search, 0 indicates from the current recordsearchIndication - indication of the search mode for the enhanced searchpatt - is the reference to the byte array containing the search pattern.pattOffset - is the offset of the search pattern in the byte array.pattLength - is the length of the search pattern.response - reference to response array to hold the record numbersrespOffset - is the offset into the response array to store the record numbersrespLength - - is the maximum number of elements to be copied into the response array.
If the respLength is greater than the number of records found, the whole response
is copied into the response buffer and the number of elements copied is returned by the method.
If the respLength is smaller than the number of records found, the first respLength record
numbers are copied into the response buffer and respLength is returned by the method.java.lang.NullPointerException - if patt is nulljava.lang.ArrayIndexOutOfBoundsException - if searching would cause access of data outside array boundsUICCException - in case of errorINTERNAL_ERROR
OUT_OF_RECORD_BOUNDARIESif pattLengthis greater than the record size
COMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
NO_EF_SELECTED
RECORD_NOT_FOUND: record with number recordNum not found in file
INVALID_MODE
COMMAND_NOT_ALLOWED if the referenced file is terminatedshort increase(byte[] incr,
short incrOffset,
short incrLength,
byte[] resp,
short respOffset)
throws java.lang.NullPointerException,
java.lang.ArrayIndexOutOfBoundsException,
UICCException
Notes:
incrOffset or incrLength or respOffset parameter
is negative an ArrayIndexOutOfBoundsException exception is thrown.
incrOffset+incrLength is greater than increase.length, the length
of the increase array an ArrayIndexOutOfBoundsException exception is thrown
and no increase is performed.
respOffset is greater than response.length, the length
of the response array a ArrayIndexOutOfBoundsException exception is thrown
and no increase is performed.
incr - is the reference to the source byte array, containing the value to increase.
The increase is only performed if the result would not exceed the maximum value of
the record.incrOffset - is the offset in the source byte array.incrLength - is the length of the data in the incr array, 0<= incrLength <128resp - is the reference to the response byte array for the new record value.
If resp buffer is bigger than the record size, the resp buffer is filled
with the record value and left justified.respOffset - is the offset in the response byte array.java.lang.NullPointerException - if incr or resp is nulljava.lang.ArrayIndexOutOfBoundsException - if increasing would cause access of data outside array boundsUICCException - in case of errorNO_EF_SELECTED
MEMORY_PROBLEM
INTERNAL_ERROR
COMMAND_INCOMPATIBLE
SECURITY_STATUS_NOT_SATISFIED
REF_DATA_INVALIDATED
RECORD_NOT_FOUND
MAX_VALUE_REACHED
COMMAND_NOT_ALLOWED if the referenced file is terminatedvoid deactivateFile()
throws UICCException
UICCException - in case of errorNO_EF_SELECTED
SECURITY_STATUS_NOT_SATISFIED
INTERNAL_ERROR
COMMAND_NOT_ALLOWED if the referenced file is terminatedvoid activateFile()
throws UICCException
UICCException - in case of error NO_EF_SELECTED
SECURITY_STATUS_NOT_SATISFIED
INTERNAL_ERROR
COMMAND_NOT_ALLOWED if the referenced file is terminated