public interface SLE4442Card extends MemoryCard
Modifier and Type | Field and Description |
---|---|
static int |
MEMORY_CARD_AREA_MAIN
Main data area of memory card
|
static int |
MEMORY_CARD_AREA_PROTECTED
Manufacture of memory card
|
static int |
MEMORY_CARD_AREA_SECURITY
Security data storage of memory card.
|
PROTOCOL_RFCARD_TYPE_A, PROTOCOL_RFCARD_TYPE_B, PROTOCOL_T_0, PROTOCOL_T_1, PROTOCOL_UNKNOWN, STATUS_ABSENT, STATUS_CONNECTED, STATUS_DISCONNECTED
Modifier and Type | Method and Description |
---|---|
ATR |
connect()
Applies power to the smart card reader slot, performing a cold reset.
|
void |
disconnect()
Removes power from the smart card reader slot.
|
byte[] |
read(int area,
int address,
int length)
Reads data.
|
boolean |
verify(byte[] key)
Authenticates the card with key.
|
void |
write(int area,
int address,
byte[] data)
Writes data.
|
getCardStatus, getID, getProtocol
static final int MEMORY_CARD_AREA_MAIN
static final int MEMORY_CARD_AREA_PROTECTED
static final int MEMORY_CARD_AREA_SECURITY
ATR connect() throws DeviceException
Calling this method when the slot power is off will normally reset the card, resulting in the transmission of an ATR by the card in the slot.
DeviceException
- for the standard reasons that are documented in
DeviceException
.void disconnect() throws DeviceException
DeviceException
- for the standard reasons that are documented in
DeviceException
.boolean verify(byte[] key) throws DeviceException
key
- true
Authenticates success. false
Authenticates fail.DeviceException
- for the standard reasons that are documented in
DeviceException
.byte[] read(int area, int address, int length) throws DeviceException
area
- the read area defined in the constants:
address
- from 0length
- data lengthDeviceException
- for the standard reasons that are documented in
DeviceException
.void write(int area, int address, byte[] data) throws DeviceException
area
- the write area defined in the constants:
address
- from 0data
- write dataDeviceException
- for the standard reasons that are documented in
DeviceException
.