com.sun.javacard.clientlib
Class ApduIOCardAccessor

java.lang.Object
  extended by com.sun.javacard.clientlib.ApduIOCardAccessor
All Implemented Interfaces:
CardAccessor

public class ApduIOCardAccessor
extends java.lang.Object
implements CardAccessor

Implementation of CardAccessor using ApduIO library


Field Summary
protected  com.sun.javacard.apduio.CadClientInterface cad
          Reference to underlying ApduIO object.
 
Constructor Summary
ApduIOCardAccessor()
          Creates a new instance of ApduIOCardAccessor
 
Method Summary
 void closeCard()
          Close and powerdown the card.
 byte[] exchangeAPDU(byte[] capdu)
          Implementation of exchangeAPDU method of CardAccessor interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cad

protected com.sun.javacard.apduio.CadClientInterface cad
Reference to underlying ApduIO object.

Constructor Detail

ApduIOCardAccessor

public ApduIOCardAccessor()
                   throws java.lang.Exception
Creates a new instance of ApduIOCardAccessor

Throws:
java.lang.Exception - Thrown is config file jcclient.properties is not found in classpath or communication error happened.
Method Detail

exchangeAPDU

public byte[] exchangeAPDU(byte[] capdu)
                    throws java.io.IOException
Implementation of exchangeAPDU method of CardAccessor interface

Specified by:
exchangeAPDU in interface CardAccessor
Parameters:
capdu - byte array containing C-APDU
Returns:
R-APDU in the format described in the javadoc for CardAccessor
Throws:
java.io.IOException - In case of I/O error

closeCard

public void closeCard()
               throws java.lang.Exception
Close and powerdown the card.

Specified by:
closeCard in interface CardAccessor
Throws:
java.lang.Exception - Thrown if a problem occured