Class ClientPCSCProtocol


  • public class ClientPCSCProtocol
    extends ClientProtocol
    The ClientPCSCProtocol class manages the client (terminal) side of the PCSC exchange with a CAD. In a future release, when JSR 268 (communication between JavaSE and Smart Cards) is implemented, the methods from this class must be rewritten to call corresponding new API methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.ResourceBundle _messages  
      protected com.sun.javacard.jpcsclite.ConnectionType ctx  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientPCSCProtocol()
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeCard()  
      void exchangeApdu​(Apdu apdu)
      Exchange an APDU with a CAD.
      boolean getAuto61xx()
      Processing of code 61xx is done automatically by PCSC
      byte[] openCard​(int readerNumber)  
      void setAuto61xx​(boolean state)
      Processing of code 61xx is done automatically by PCSC
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ctx

        protected com.sun.javacard.jpcsclite.ConnectionType ctx
      • _messages

        protected static java.util.ResourceBundle _messages
    • Constructor Detail

      • ClientPCSCProtocol

        public ClientPCSCProtocol()
        Constructs a new instance. The Cad object which all IO will be done through.
    • Method Detail

      • setAuto61xx

        public void setAuto61xx​(boolean state)
        Processing of code 61xx is done automatically by PCSC
        Parameters:
        state -
      • getAuto61xx

        public boolean getAuto61xx()
        Processing of code 61xx is done automatically by PCSC
        Returns:
        true always
      • exchangeApdu

        public void exchangeApdu​(Apdu apdu)
                          throws java.io.IOException
        Exchange an APDU with a CAD.
        Specified by:
        exchangeApdu in class ClientProtocol
        Parameters:
        apdu - The APDU to exchange.
        Throws:
        java.io.IOException
      • openCard

        public byte[] openCard​(int readerNumber)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • closeCard

        public void closeCard()