Package uicc.access.bertlvfile
Interface BERTLVFileView
-
- All Superinterfaces:
FileView,javacard.framework.Shareable
- All Known Subinterfaces:
AdminBERTLVFileView
public interface BERTLVFileView extends FileView
TheBERTLVFileViewinterface defines the methods to access BER TLV files.
All the methods are based on the commands of the TS 102 221 specification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteData(int tag)This method deletes a data object in the current BER-TLV structure EF.intgetTAGList(byte mode, int[] responseBuffer, short responseOffset, short responseLength)This method gets the list of TAGs already allocated in the current BER-TLV structure EF.intretrieveData(int tag, int dataObjectOffset, byte[] responseBuffer, short responseOffset, short responseLength)This method retrieves a part of a data object from the current BER-TLV structure EF.intsetData(int tag, byte mode, int dataLength, byte[] data, short offset, short length)This method sets a data object in the current BER-TLV structure EF.-
Methods inherited from interface uicc.access.FileView
activateFile, deactivateFile, increase, readBinary, readRecord, searchRecord, select, select, select, status, updateBinary, updateRecord
-
-
-
-
Method Detail
-
retrieveData
int retrieveData(int tag, int dataObjectOffset, byte[] responseBuffer, short responseOffset, short responseLength)This method retrieves a part of a data object from the current BER-TLV structure EF.Notes:
- The TAG and Length of the requested data object are not copied in
responseBuffer - After a successful call to this method, current TAG pointer and current offset in the data object are undefined
- If
responseOffsetorresponseLengthparameter is negative anArrayIndexOutOfBoundsExceptionexception is thrown. - If
responseOffset+responseLengthis greater thanresponseBuffer.length, the length of theresponseBufferarray aArrayIndexOutOfBoundsExceptionexception is thrown and no read is performed. - If
tagvalue is invalid or is equal to '5C', anUICCExceptionwith reason codeINVALID_TAG_VALUEis thrown
- Parameters:
tag- is the TAG value of TLV object that shall be retrieved.dataObjectOffset- is the offset in the data object.responseBuffer- is the reference to the response byte array for read data.responseOffset- is the offset in the response byte array.responseLength- is the number of bytes to read.- Returns:
- Number of remaining bytes to read
- Throws:
java.lang.NullPointerException- ifresponseBufferisnulljava.lang.ArrayIndexOutOfBoundsException- if reading would cause access of data outside array boundsUICCException- in case of errorINTERNAL_ERRORCOMMAND_INCOMPATIBLESECURITY_STATUS_NOT_SATISFIEDREF_DATA_INVALIDATEDNO_EF_SELECTEDREFERENCED_DATA_NOT_FOUNDCONDITIONS_OF_USE_NOT_SATISFIEDOUT_OF_DATA_BOUNDARIESINVALID_TAG_VALUE
- The TAG and Length of the requested data object are not copied in
-
getTAGList
int getTAGList(byte mode, int[] responseBuffer, short responseOffset, short responseLength)This method gets the list of TAGs already allocated in the current BER-TLV structure EF.Notes:
- After a successful call to this method, current TAG pointer and current offset in the data object are undefined
- If
responseOffsetorresponseLengthparameter is negative anArrayIndexOutOfBoundsExceptionexception is thrown. - If
responseOffset+responseLengthis greater thanresponseBuffer.length, the length of theresponseBufferarray aArrayIndexOutOfBoundsExceptionexception is thrown and no operation is performed.
- Parameters:
mode- is the mode to be used (UICCConstants.BER_TLV_ACC_MODE_FIRST or UICCConstants.BER_TLV_ACC_MODE_NEXT)responseBuffer- is the reference to the response int array for read data. Each component of theresponseBufferarray contains a single TAG.responseOffset- is the offset in the response int array.responseLength- is the number of TAGs to read.- Returns:
- Number of remaining TAGs to read
- Throws:
java.lang.NullPointerException- ifresponseBufferisnulljava.lang.ArrayIndexOutOfBoundsException- if reading would cause access of data outside array boundsUICCException- in case of errorINTERNAL_ERRORCOMMAND_INCOMPATIBLESECURITY_STATUS_NOT_SATISFIEDREF_DATA_INVALIDATEDNO_EF_SELECTEDINVALID_MODECONDITIONS_OF_USE_NOT_SATISFIEDOUT_OF_DATA_BOUNDARIES
-
setData
int setData(int tag, byte mode, int dataLength, byte[] data, short offset, short length)This method sets a data object in the current BER-TLV structure EF.Notes:
- A transfer ends immediately after the end of the data object is reached (last successful call to this method).
- As long as the transfer is not complete, the data object is not available for other entities.
- If
offsetorlengthparameter is negative anArrayIndexOutOfBoundsExceptionexception is thrown. - If
offset+lengthis greater thandata.length, the length of thedataarray aArrayIndexOutOfBoundsExceptionexception is thrown and no update is performed. - If
modeisBER_TLV_ACC_MODE_FIRSTanddataLengthis equal to 0, a zero length object is created. - If
tagvalue is invalid or is equal to '5C', anUICCExceptionwith reason codeINVALID_TAG_VALUEis thrown
- Parameters:
tag- is the TAG value of TLV object that shall be set. The value is not significant ifmodeparameter is set to UICCConstants.BER_TLV_ACC_MODE_NEXT.mode- is the mode to be used (UICCConstants.BER_TLV_ACC_MODE_FIRST or UICCConstants.BER_TLV_ACC_MODE_NEXT)dataLength- is the length of the value field of the BER-TLV data object. The value is not significant ifmodeparameter is set to UICCConstants.BER_TLV_ACC_MODE_NEXT.data- is the reference to the data byte array.offset- is the offset in the data byte array.length- is the number of bytes to set.- Returns:
- Number of remaining bytes to set
- Throws:
java.lang.NullPointerException- ifresponseBufferisnulljava.lang.ArrayIndexOutOfBoundsException- if reading would cause access of data outside array boundsUICCException- in case of errorINTERNAL_ERRORCOMMAND_INCOMPATIBLESECURITY_STATUS_NOT_SATISFIEDNO_EF_SELECTEDINVALID_MODEMEMORY_PROBLEMREFERENCED_DATA_NOT_FOUNDNOT_ENOUGH_MEMORY_SPACECONDITIONS_OF_USE_NOT_SATISFIEDOUT_OF_DATA_BOUNDARIESINVALID_TAG_VALUE
-
deleteData
void deleteData(int tag)
This method deletes a data object in the current BER-TLV structure EF.Notes:
- After a successful call to this method, current TAG pointer and current offset in the data object are undefined
- If
tagvalue is invalid or is equal to '5C', anUICCExceptionwith reason codeINVALID_TAG_VALUEis thrown
- Parameters:
tag- is the TAG value of TLV object that shall be deleted.- Throws:
UICCException- in case of errorINTERNAL_ERRORCOMMAND_INCOMPATIBLESECURITY_STATUS_NOT_SATISFIEDREFERENCED_DATA_NOT_FOUNDCONDITIONS_OF_USE_NOT_SATISFIEDNO_EF_SELECTEDINVALID_TAG_VALUE
-
-