public interface Card
通过这个接口,可以实现卡片和读卡设备之间的连接或断开操作,并且获得卡片的ATR,ID和状态等基本信息.
Modifier and Type | Field and Description |
---|---|
static int |
PROTOCOL_RFCARD_TYPE_A
ISO14443 TYPE A.
|
static int |
PROTOCOL_RFCARD_TYPE_B
ISO14443 TYPE B.
|
static int |
PROTOCOL_T_0
The asynchronous half-duplex communication protocol of T=0
|
static int |
PROTOCOL_T_1
The asynchronous half-duplex communication protocol of T=1
|
static int |
PROTOCOL_UNKNOWN
UNKNOW protocol
|
static int |
STATUS_ABSENT
Card slot status:removed.
|
static int |
STATUS_CONNECTED
Card slot status:connected.
|
static int |
STATUS_DISCONNECTED
Card slot status:disconnected.
|
Modifier and Type | Method and Description |
---|---|
int |
getCardStatus()
Gets card status.
|
byte[] |
getID()
Gets card ID.
|
int |
getProtocol()
Gets the constant value of the communication protocol between the card slot and the card.
|
static final int PROTOCOL_RFCARD_TYPE_A
static final int PROTOCOL_RFCARD_TYPE_B
static final int PROTOCOL_T_0
static final int PROTOCOL_T_1
static final int PROTOCOL_UNKNOWN
static final int STATUS_CONNECTED
static final int STATUS_DISCONNECTED
static final int STATUS_ABSENT
byte[] getID() throws DeviceException
DeviceException
int getProtocol() throws DeviceException
The method is a synchronized method. When a card is in the card slot and the card slot is opened, the method will be called.
DeviceException
- for the standard reasons that are documented in
DeviceException
.int getCardStatus() throws DeviceException
DeviceException
- for the standard reasons that are documented in
DeviceException
.