Package com.sun.javacard.apduio
Class ClientT0Protocol
- java.lang.Object
-
- com.sun.javacard.apduio.ClientProtocol
-
- com.sun.javacard.apduio.ClientT0Protocol
-
public class ClientT0Protocol extends ClientProtocol
The ClientT0Protocol class manages the client (terminal) side of the T=0 protocol exchange with a CAD.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
auto61xx
This field maintains the current state of the auto61xx flag.-
Fields inherited from class com.sun.javacard.apduio.ClientProtocol
cad
-
-
Constructor Summary
Constructors Constructor Description ClientT0Protocol(CadT0Client cad)
Constructs a new ClientT0Protocol instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exchangeApdu(Apdu apdu)
Exchange a case 1, 2s, 3s, 4s, 2e, 3e or 4e APDU with a CAD.boolean
getAuto61xx()
Tests if auto61xx is enabled.void
setAuto61xx(boolean state)
Enables or disables auto61xx.
-
-
-
Constructor Detail
-
ClientT0Protocol
public ClientT0Protocol(CadT0Client cad)
Constructs a new ClientT0Protocol instance.- Parameters:
cad
- The Cad object which all IO will be done through.
-
-
Method Detail
-
setAuto61xx
public void setAuto61xx(boolean state)
Enables or disables auto61xx. If auto61xx is true, the protocol code will automatically issue an ISO 7816-4 "Get Response" apdu whenever the card response with a SW1/SW2 of 61xx. If false, ISO "Get Response" APDU's will not be issued when the card returns a status of 61xx.- Parameters:
state
- True enables auto61xx, false disables auto61xx.
-
getAuto61xx
public boolean getAuto61xx()
Tests if auto61xx is enabled.- Returns:
- The state of the auto61xx flag.
-
exchangeApdu
public void exchangeApdu(Apdu apdu) throws java.io.IOException, TLP224Exception
Exchange a case 1, 2s, 3s, 4s, 2e, 3e or 4e APDU with a CAD.- Specified by:
exchangeApdu
in classClientProtocol
- Parameters:
apdu
- The APDU to exchange.- Throws:
TLP224Exception
- if the apdu is an unsupported case.java.io.IOException
-
-