public final class Channel extends Object
Channel objects and obtain Channel information.
The interfaces can be used to check whether a channel is disabled or whether a channel is a basic one, disable a channel, send an APDU command, and obtain the response of a secure element.
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
closeChannel() |
Disables a channel.
|
byte[] |
getSelectResponse() |
Obtains the response to the command to select a secure element.
|
boolean |
isBasicChannel() |
Checks whether a channel is a basic one.
|
boolean |
isClosed() |
Checks whether a channel is disabled.
|
byte[] |
transmit(byte[] command) |
Sends an APDU command to a secure element.
|
public boolean isClosed()
A channel must have been enabled before an APDU command is sent through the channel.
true if the channel is disabled; returns false otherwise.public boolean isBasicChannel()
true if the channel is a basic one; returns false otherwise.public byte[] transmit(byte[] command)
command - Indicates the APDU command.public byte[] getSelectResponse()
The response is in byte array format.
public void closeChannel()