Interface CommonIsoCardSelector<T extends CommonIsoCardSelector<T>>

Type Parameters:
T - The type of the lowest level child object.
All Superinterfaces:
CardSelector<T>
All Known Subinterfaces:
IsoCardSelector

public interface CommonIsoCardSelector<T extends CommonIsoCardSelector<T>> extends CardSelector<T>
Common ISO filters used to restrict the selection process to certain ISO 7816-4 cards.

These filters are all optional but can also be combined.

If no filtering is specified, any card that responds when inserted in the reader will be considered selected.

Conversely, if one or more filters have been defined, the card will not be selected if one of them rejects the card.

Since:
2.0.0
  • Method Details

    • filterByDfName

      T filterByDfName(byte[] aid)
      Selects a card application DF by its name.

      The DF is selected only if its name starts with the provided AID, as defined by ISO7816-4 chapter 4.2.

      The provided AID will be used as a parameter of the "Selection Application" ISO card command.

      Parameters:
      aid - The AID as a byte array containing 5 to 16 bytes.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If the provided array is null or out of range.
      Since:
      2.0.0
    • filterByDfName

      T filterByDfName(String aid)
      Selects a card application DF by its name.

      The DF is selected only if its name starts with the provided AID, as defined by ISO7816-4 chapter 4.2.

      The provided AID will be used as a parameter of the "Selection Application" ISO card command.

      Parameters:
      aid - The AID as a hexadecimal string of 5 to 16 bytes.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If the provided string is null, invalid or out of range.
      Since:
      2.0.0
    • setFileOccurrence

      T setFileOccurrence(CommonIsoCardSelector.FileOccurrence fileOccurrence)
      Sets the file occurrence mode (see ISO7816-4).

      The default value is CommonIsoCardSelector.FileOccurrence.FIRST.

      Parameters:
      fileOccurrence - The CommonIsoCardSelector.FileOccurrence.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If fileOccurrence is null.
      Since:
      2.0.0
    • setFileControlInformation

      T setFileControlInformation(CommonIsoCardSelector.FileControlInformation fileControlInformation)
      Sets the file control mode (see ISO7816-4).

      The default value is CommonIsoCardSelector.FileControlInformation.FCI.

      Parameters:
      fileControlInformation - The CommonIsoCardSelector.FileControlInformation.
      Returns:
      The current instance.
      Throws:
      IllegalArgumentException - If fileControlInformation is null.
      Since:
      2.0.0