Reader

public class Reader

Class represents a smart card reader (either a physical, hardware reader, or a virtual smart card reader).

Methods

connect

public Token connect()

Connects to the card inserted in the reader. This method succeeds only if the card is supported by the middleware.

Returns a Token object resulting from the operation.

Returns:

the Token object connected to the reader.

getName

public String getName()

Gets the name of the reader.

Returns:

the name of the reader.

getStatus

public Status getStatus()

Gets the status of the reader, as a Status enum. The following status can be returned:

Returns:

the status of the reader.

isCardPresent

public boolean isCardPresent()

Returns true if the card is inserted in the reader.

Returns:

true if the card is inserted in the reader; false otherwise

isDongle

public boolean isDongle()

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.

Returns:

true if the reader is known as un USB dongle type; false otherwise

isVirtual

public boolean isVirtual()

Returns true if the reader is a virtual smart card.

Returns:

true if the reader is a virtual smart card; false otherwise