Card, CommandAPDU, ResponseAPDU
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract Card | Returns: the Card this channel is associated withReturns the Card this channel is associated with. |
| public abstract int | Returns: the channel number of this CardChannel.Returns the channel number of this CardChannel. |
| public abstract ResponseAPDU | Returns: the response APDU received from the cardthe command APDU command)Transmits the specified command APDU to the Smart Card and returns the response APDU. |
| public abstract int | Returns: the length of the received response APDUthe buffer containing the command APDU command, ByteBuffer the buffer that shall receive the response APDU from
the card response)Transmits the command APDU stored in the command ByteBuffer and receives the response APDU in the response ByteBuffer. |
| CardChannel | back to summary |
|---|---|
| protected CardChannel() Constructs a new CardChannel object. This constructor is called by subclasses only. Application should call the Card#getBasicChannel and Card#openLogicalChannel methods to obtain a CardChannel object. | |
| close | back to summary |
|---|---|
| public abstract void close() throws CardException Closes this CardChannel. The logical channel is closed by issuing
a Note that the basic logical channel cannot be closed using this
method. It can be closed by calling
| |
| getCard | back to summary |
|---|---|
| public abstract Card getCard() Returns the Card this channel is associated with.
| |
| getChannelNumber | back to summary |
|---|---|
| public abstract int getChannelNumber() Returns the channel number of this CardChannel. A channel number of 0 indicates the basic logical channel.
| |
| transmit | back to summary |
|---|---|
| public abstract ResponseAPDU transmit(CommandAPDU command) throws CardException Transmits the specified command APDU to the Smart Card and returns the response APDU. 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
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:
The ResponseAPDU returned by this method is the result after this processing has been performed.
| |
| transmit | back to summary |
|---|---|
| public abstract int transmit(ByteBuffer command, ByteBuffer response) throws CardException Transmits the command APDU stored in the command ByteBuffer and receives the response APDU in the response ByteBuffer. The command buffer must contain valid command APDU data starting
at 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
See transmit() for a discussion of the handling
of response APDUs with the SW1 values
| |