.. java:import:: org.json JSONObject Reader ====== .. java:package:: com.idopte.scmapi :noindex: .. java:type:: public class Reader Class represents a smart card reader (either a physical, hardware reader, or a virtual smart card reader). Methods ------- connect ^^^^^^^ .. java:method:: public Token connect() throws SCMException :outertype: Reader Connects to the card inserted in the reader. This method succeeds only if the card is supported by the middleware. Returns a \ :java:ref:`Token`\ object resulting from the operation. :return: the \ :java:ref:`Token`\ object connected to the reader. getName ^^^^^^^ .. java:method:: public String getName() :outertype: Reader Gets the name of the reader. :return: the name of the reader. getStatus ^^^^^^^^^ .. java:method:: public Status getStatus() :outertype: Reader Gets the status of the reader, as a \ :java:ref:`Status`\ enum. The following status can be returned: .. * \ :java:ref:`Status.UNAVAILABLE`\ * \ :java:ref:`Status.MUTE`\ * \ :java:ref:`Status.EXCLUSIVE`\ * \ :java:ref:`Status.OK`\ :return: the status of the reader. isCardPresent ^^^^^^^^^^^^^ .. java:method:: public boolean isCardPresent() :outertype: Reader Returns \ ``true``\ if the card is inserted in the reader. :return: \ ``true``\ if the card is inserted in the reader; \ ``false``\ otherwise isDongle ^^^^^^^^ .. java:method:: public boolean isDongle() :outertype: Reader Returns \ ``true``\ if the reader is known as an USB dongle type (as opposed to a standard ID-1 format card reader). Note: that this is indicative, and based on an internal registry of reader names. :return: \ ``true``\ if the reader is known as un USB dongle type; \ ``false``\ otherwise isVirtual ^^^^^^^^^ .. java:method:: public boolean isVirtual() :outertype: Reader Returns \ ``true``\ if the reader is a virtual smart card. :return: \ ``true``\ if the reader is a virtual smart card; \ ``false``\ otherwise