uicc.access.bertlvfile

## Interface BERTLVFileView

- All Superinterfaces:
    FileView
  All Known Subinterfaces:
    AdminBERTLVFileView

      public interface BERTLVFileView
      extends FileView

  The `BERTLVFileView` interface 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 and Description
    --- | ---
    `void` | `deleteData(int tag)` This method deletes a data object in the current BER-TLV structure EF.
    `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.
    `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.
    `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.

    - ### 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 `responseOffset` or `responseLength` parameter is negative an `ArrayIndexOutOfBoundsException` exception is thrown.
      - If `responseOffset+responseLength` is greater than `responseBuffer.length`, the length of the `responseBuffer` array a `ArrayIndexOutOfBoundsException` exception is thrown and no read is performed.
      - If `tag` value is invalid or is equal to '5C', an `UICCException` with reason code `INVALID_TAG_VALUE` is 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` - if `responseBuffer` is `null`
        `java.lang.ArrayIndexOutOfBoundsException` - if reading would cause access of data outside array bounds
        `UICCException` - in case of error
        - `INTERNAL_ERROR`
        - `COMMAND_INCOMPATIBLE`
        - `SECURITY_STATUS_NOT_SATISFIED`
        - `REF_DATA_INVALIDATED`
        - `NO_EF_SELECTED`
        - `REFERENCED_DATA_NOT_FOUND`
        - `CONDITIONS_OF_USE_NOT_SATISFIED`
        - `OUT_OF_DATA_BOUNDARIES`
        - `INVALID_TAG_VALUE`

    - #### 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 `responseOffset` or `responseLength` parameter is negative an `ArrayIndexOutOfBoundsException` exception is thrown.
      - If `responseOffset+responseLength` is greater than `responseBuffer.length`, the length of the `responseBuffer` array a `ArrayIndexOutOfBoundsException` exception 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 the `responseBuffer`array 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` - if `responseBuffer` is `null`
        `java.lang.ArrayIndexOutOfBoundsException` - if reading would cause access of data outside array bounds
        `UICCException` - in case of error
        - `INTERNAL_ERROR`
        - `COMMAND_INCOMPATIBLE`
        - `SECURITY_STATUS_NOT_SATISFIED`
        - `REF_DATA_INVALIDATED`
        - `NO_EF_SELECTED`
        - `INVALID_MODE`
        - `CONDITIONS_OF_USE_NOT_SATISFIED`
        - `OUT_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 `offset` or `length` parameter is negative an `ArrayIndexOutOfBoundsException` exception is thrown.
      - If `offset+length` is greater than `data.length`, the length of the `data` array a `ArrayIndexOutOfBoundsException` exception is thrown and no update is performed.
      - If `mode` is `BER_TLV_ACC_MODE_FIRST` and `dataLength` is equal to 0, a zero length object is created.
      - If `tag` value is invalid or is equal to '5C', an `UICCException` with reason code `INVALID_TAG_VALUE` is thrown
      Parameters:
        `tag` - is the TAG value of TLV object that shall be set. The value is not significant if `mode` parameter 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 if `mode` parameter 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` - if `responseBuffer` is `null`
        `java.lang.ArrayIndexOutOfBoundsException` - if reading would cause access of data outside array bounds
        `UICCException` - in case of error
        - `INTERNAL_ERROR`
        - `COMMAND_INCOMPATIBLE`
        - `SECURITY_STATUS_NOT_SATISFIED`
        - `NO_EF_SELECTED`
        - `INVALID_MODE`
        - `MEMORY_PROBLEM`
        - `REFERENCED_DATA_NOT_FOUND`
        - `NOT_ENOUGH_MEMORY_SPACE`
        - `CONDITIONS_OF_USE_NOT_SATISFIED`
        - `OUT_OF_DATA_BOUNDARIES`
        - `INVALID_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 `tag` value is invalid or is equal to '5C', an `UICCException` with reason code `INVALID_TAG_VALUE` is thrown
      Parameters:
        `tag` - is the TAG value of TLV object that shall be deleted.
      Throws:
        `UICCException` - in case of error
        - `INTERNAL_ERROR`
        - `COMMAND_INCOMPATIBLE`
        - `SECURITY_STATUS_NOT_SATISFIED`
        - `REFERENCED_DATA_NOT_FOUND`
        - `CONDITIONS_OF_USE_NOT_SATISFIED`
        - `NO_EF_SELECTED`
        - `INVALID_TAG_VALUE`

Copyright © 2017 ETSI All Rights Reserved.