Enum Class ProductType

java.lang.Object
java.lang.Enum<ProductType>
org.eclipse.keypop.storagecard.card.ProductType
All Implemented Interfaces:
Serializable, Comparable<ProductType>, Constable

public enum ProductType extends Enum<ProductType>
The ProductType enum represents the different types of storage cards supported by the library.
Since:
1.0.0
  • Enum Constant Details

    • MIFARE_ULTRALIGHT

      public static final ProductType MIFARE_ULTRALIGHT
      NXP Mifare Ultralight
      Since:
      1.0.0
    • ST25_SRT512

      public static final ProductType ST25_SRT512
      ST Microelectronics ST25 / SRT512
      Since:
      1.0.0
  • Method Details

    • values

      public static ProductType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ProductType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getBlockCount

      public int getBlockCount()
      Returns the number of blocks in a storage card of a specific type.

      This number reflects the quantity of blocks contained in the main memory area. Please note that there might be additional "system" blocks not included in this count.

      Returns:
      The number of blocks in the storage card.
      Since:
      1.0.0
    • getBlockSize

      public int getBlockSize()
      Returns the size of each block in bytes.
      Returns:
      The size of each block in bytes.
      Since:
      1.0.0
    • hasSystemBlock

      public boolean hasSystemBlock()
      Indicates whether this card type has an accessible system block.

      For ST25/SRT512 cards, the system block is accessible at address 255. For MIFARE Ultralight cards, no system block is accessible through the API.

      When a system block is available, it can be read using the appropriate prepare methods during card selection or transaction processing.

      Returns:
      true if this card type has an accessible system block, false otherwise.
      Since:
      1.0.0
    • hasWriteAcknowledgment

      public boolean hasWriteAcknowledgment()
      Indicates whether this storage card provides a reliable acknowledgment after write operations.

      If this method returns true, the card guarantees that a successful response to a write command means the data has been correctly stored, and no additional verification is required. If it returns false, the card does not guarantee the actual completion of the write, and a verification read must be performed to ensure data consistency.

      Returns:
      true if the card provides a reliable write acknowledgment, false otherwise.
      Since:
      1.0.0