Interface StorageCard

All Superinterfaces:
org.eclipse.keypop.reader.selection.spi.SmartCard

public interface StorageCard extends org.eclipse.keypop.reader.selection.spi.SmartCard
Represents a storage card with various methods to retrieve information and data from it.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    getBlock(int blockNumber)
    Retrieves the data block at the specified block number.
    byte[]
    getBlocks(int fromBlockNumber, int toBlockNumber)
    Retrieves the data blocks within the specified range from the memory image of the storage card.
    Returns the product type of the storage card.
    byte[]
    Retrieves the unique identifier (UID) of the storage card.

    Methods inherited from interface org.eclipse.keypop.reader.selection.spi.SmartCard

    getPowerOnData
  • Method Details

    • getProductType

      ProductType getProductType()
      Returns the product type of the storage card.
      Returns:
      The product type of the storage card.
      Since:
      1.0.0
    • getUID

      byte[] getUID()
      Retrieves the unique identifier (UID) of the storage card.
      Returns:
      A byte array representing the UID of the storage card.
    • getBlock

      byte[] getBlock(int blockNumber)
      Retrieves the data block at the specified block number.
      Parameters:
      blockNumber - The number of the block to retrieve
      Returns:
      The data block as a byte array.
      Throws:
      IllegalArgumentException - If the block number is out of range.
      Since:
      1.0.0
    • getBlocks

      byte[] getBlocks(int fromBlockNumber, int toBlockNumber)
      Retrieves the data blocks within the specified range from the memory image of the storage card. The returned array contains the blocks in order, from fromBlockNumber to toBlockNumber. If a block has not been previously read and stored in memory, its value is replaced with 0s.
      Parameters:
      fromBlockNumber - The starting block number (inclusive).
      toBlockNumber - The ending block number (inclusive).
      Returns:
      A byte array containing the data blocks within the specified range.
      Throws:
      IllegalArgumentException - If fromBlockNumber is greater than toBlockNumber, if either block number is negative, or if they exceed the available range of the memory image.