Package com.sun.javacard.apduio
Class CadT1Client
- java.lang.Object
-
- com.sun.javacard.apduio.CadDevice
-
- com.sun.javacard.apduio.CadT1
-
- com.sun.javacard.apduio.CadT1Client
-
- All Implemented Interfaces:
CadClientInterface
public class CadT1Client extends CadT1 implements CadClientInterface
The CadT1Client class maintains the context for the client (terminal) side of the terminal CAD connection. This class works in conjunction with the ClientProtocol and ClientT1Protocol classes
-
-
Field Summary
Fields Modifier and Type Field Description protected T1Block
inBlock
protected T1Block
outBlock
protected ClientProtocol
protocol
-
Fields inherited from class com.sun.javacard.apduio.CadT1
MAX_IFS_SIZE
-
Fields inherited from class com.sun.javacard.apduio.CadDevice
_messages, debug, deviceProtocol, in, out, PROTOCOL_PCSC, PROTOCOL_T0, PROTOCOL_T1, PROTOCOL_TCL
-
-
Constructor Summary
Constructors Constructor Description CadT1Client(java.io.InputStream in, java.io.OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exchangeApdu(Apdu apdu)
Exchange an Apdu with a CAD.void
powerDown()
Powerdown a card or simulator and then disconnectvoid
powerDown(boolean disconnect)
Send powerdown to a cardbyte[]
powerUp()
Send powerup to a card or a simulator-
Methods inherited from class com.sun.javacard.apduio.CadT1
exchangeBlock, getMaxIFSSize, receiveBlock, receivePowerUp, retrieveATR, sendATR, sendPowerDown, sendPowerUp
-
Methods inherited from class com.sun.javacard.apduio.CadDevice
close, getCadClientInstance, getDeviceProtocol, getPCSCClientInstance
-
-
-
-
Field Detail
-
inBlock
protected T1Block inBlock
-
outBlock
protected T1Block outBlock
-
protocol
protected ClientProtocol protocol
-
-
Method Detail
-
exchangeApdu
public void exchangeApdu(Apdu apdu) throws java.io.IOException, CadTransportException
Exchange an Apdu with a CAD.- Specified by:
exchangeApdu
in interfaceCadClientInterface
- Parameters:
apdu
- The Apdu to send and receive data from.- Throws:
CadTransportException
- if the CAD has not been powered up.java.io.IOException
- if a communication error happens while communicating with the CAD.
-
powerDown
public void powerDown(boolean disconnect) throws java.io.IOException, CadTransportException
Description copied from interface:CadClientInterface
Send powerdown to a card- Specified by:
powerDown
in interfaceCadClientInterface
- Parameters:
disconnect
- This parameter is applicable to card simulators only. true = disconnect from the simulator false = powedown, but leave the connection open- Throws:
java.io.IOException
- Communication errorCadTransportException
- Protocol error
-
powerDown
public void powerDown() throws java.io.IOException, CadTransportException
Description copied from interface:CadClientInterface
Powerdown a card or simulator and then disconnect- Specified by:
powerDown
in interfaceCadClientInterface
- Throws:
java.io.IOException
- Communication errorCadTransportException
- Protocol error
-
powerUp
public byte[] powerUp() throws java.io.IOException, CadTransportException
Description copied from interface:CadClientInterface
Send powerup to a card or a simulator- Specified by:
powerUp
in interfaceCadClientInterface
- Returns:
- ATR bytes
- Throws:
java.io.IOException
- Communication errorCadTransportException
- Protocol error
-
-