The CLA byte of the command APDU is automatically adjusted to match the channel number of this CardChannel.
Note that this method cannot be used to transmit MANAGE CHANNEL
APDUs. Logical channels should be managed using the {@linkplain Card#openLogicalChannel} and {@linkplain CardChannel#close CardChannel.close()} methods.
Implementations should transparently handle artifacts of the transmission protocol. For example, when using the T=0 protocol, the following processing should occur as described in ISO/IEC 7816-4:
if the response APDU has an SW1 of 61
, the implementation should issue a GET RESPONSE
command using SW2
as the Le
field. This process is repeated as long as an SW1 of 61
is received. The response body of these exchanges is concatenated to form the final response body.
if the response APDU is 6C XX
, the implementation should reissue the command using XX
as the Le
field.
The ResponseAPDU returned by this method is the result after this processing has been performed.
@param command the command APDU
@return the response APDU received from the card
@throws IllegalStateException if this channel has been{@linkplain #close closed} or if the corresponding Card has been{@linkplain Card#disconnect disconnected}.
@throws IllegalArgumentException if the APDU encodes aMANAGE CHANNEL
command
@throws NullPointerException if command is null
@throws CardException if the card operation failed
|
|
|
|
|
|
|
|
|
|
|
|