java.lang.Object | |
↳ | javax.smartcardio.Card |
A Smart Card with which a connection has been established. Card objects
are obtained by calling CardTerminal.connect()
.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Card object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Requests exclusive access to this card.
| |||||||||||
Disconnects the connection with this card.
| |||||||||||
Releases the exclusive access previously established using
beginExclusive . | |||||||||||
Returns the ATR of this card.
| |||||||||||
Returns the CardChannel for the basic logical channel.
| |||||||||||
Returns the protocol in use for this card.
| |||||||||||
Opens a new logical channel to the card and returns it.
| |||||||||||
Transmits a control command to the terminal device.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a new Card object.
This constructor is called by subclasses only. Application should
call the CardTerminal.connect()
method to obtain a Card
object.
Requests exclusive access to this card.
Once a thread has invoked beginExclusive
, only this
thread is allowed to communicate with this card until it calls
endExclusive
. Other threads attempting communication
will receive a CardException.
Applications have to ensure that exclusive access is correctly
released. This can be achieved by executing
the beginExclusive()
and endExclusive
calls
in a try ... finally
block.
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission |
---|---|
CardException | if exclusive access has already been set or if exclusive access could not be established |
IllegalStateException | if this card object has been disposed of
via the disconnect() method
|
Disconnects the connection with this card. After this method returns, calling methods on this object or in CardChannels associated with this object that require interaction with the card will raise an IllegalStateException.
reset | whether to reset the card after disconnecting. |
---|
CardException | if the card operation failed |
---|---|
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission
|
Releases the exclusive access previously established using
beginExclusive
.
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission |
---|---|
IllegalStateException | if the active Thread does not currently have
exclusive access to this card or
if this card object has been disposed of
via the disconnect() method |
CardException | if the operation failed |
Returns the CardChannel for the basic logical channel. The basic logical channel has a channel number of 0.
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission |
---|---|
IllegalStateException | if this card object has been disposed of
via the disconnect() method
|
Returns the protocol in use for this card.
Opens a new logical channel to the card and returns it. The channel is
opened by issuing a MANAGE CHANNEL
command that should use
the format [00 70 00 00 01]
.
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission |
---|---|
CardException | is a new logical channel could not be opened |
IllegalStateException | if this card object has been disposed of
via the disconnect() method
|
Transmits a control command to the terminal device.
This can be used to, for example, control terminal functions like a built-in PIN pad or biometrics.
controlCode | the control code of the command |
---|---|
command | the command data |
SecurityException | if a SecurityManager exists and the
caller does not have the required
permission |
---|---|
NullPointerException | if command is null |
CardException | if the card operation failed |
IllegalStateException | if this card object has been disposed of
via the disconnect() method
|