net.sourceforge.scuba.smartcards
Class DummyAcceptingCardService
java.lang.Object
net.sourceforge.scuba.smartcards.CardService
net.sourceforge.scuba.smartcards.DummyAcceptingCardService
- All Implemented Interfaces:
- Serializable
public class DummyAcceptingCardService
- extends CardService
A dummy card service to produce APDU traces instead of the actual communication
with CAD. So far can only serve APDUs that expect 9000 status words.
- Author:
- Wojciech Mostowski
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummyAcceptingCardService
public DummyAcceptingCardService(PrintStream out)
close
public void close()
- Description copied from class:
CardService
- Closes the session with the card. Disconnects from the card and reader.
Notifies any interested apduListeners.
- Specified by:
close in class CardService
isOpen
public boolean isOpen()
- Specified by:
isOpen in class CardService
open
public void open()
throws CardServiceException
- Description copied from class:
CardService
- Opens a session with the card. Selects a reader. Connects to the card.
Notifies any interested apduListeners.
- Specified by:
open in class CardService
- Throws:
CardServiceException
transmit
public ResponseAPDU transmit(CommandAPDU apdu)
throws CardServiceException
- Description copied from class:
CardService
- Sends and apdu to the card. Notifies any interested apduListeners.
This method does not throw a CardServiceException if the ResponseAPDU
is status word indicating error.
- Specified by:
transmit in class CardService
- Parameters:
apdu - the command apdu to send.
- Returns:
- the response from the card, including the status word.
- Throws:
CardServiceException - - if the card operation failed