|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javacard.apduio.CadDevice
public abstract class CadDevice
Factory class producing CardClientInterface instances (connections to a card)
Field Summary | |
---|---|
protected static java.util.ResourceBundle |
_messages
Properties file with messages |
protected boolean |
debug
Internal debug flag. |
protected byte |
deviceProtocol
The currentry used protocol |
protected java.io.InputStream |
in
The input stream which data is read from. |
protected java.io.OutputStream |
out
The output stream to which data is written. |
static byte |
PROTOCOL_PCSC
PC/SC constant |
static byte |
PROTOCOL_T0
Protocol constant |
static byte |
PROTOCOL_T1
Protocol constant |
static byte |
PROTOCOL_TCL
Protocol constant |
Constructor Summary | |
---|---|
protected |
CadDevice(byte devProtocolType)
this form of constructor is used by PCSC streams are not applicable |
protected |
CadDevice(byte devProtocolType,
java.io.InputStream in,
java.io.OutputStream out)
this form of constructor is used by T=0, T=1 implementations |
Method Summary | |
---|---|
void |
close()
Flush and close the input and output streams. |
static CadClientInterface |
getCadClientInstance(byte protocolType,
java.io.InputStream in,
java.io.OutputStream out)
A factory method |
byte |
getDeviceProtocol()
Get the value of the protocol byte |
static CadClientInterface |
getPCSCClientInstance(int readerNumber)
A factory method for connecting to a PCSC card readed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.ResourceBundle _messages
protected java.io.InputStream in
protected java.io.OutputStream out
protected boolean debug
public static final byte PROTOCOL_T0
public static final byte PROTOCOL_T1
public static final byte PROTOCOL_TCL
public static final byte PROTOCOL_PCSC
protected byte deviceProtocol
Constructor Detail |
---|
protected CadDevice(byte devProtocolType, java.io.InputStream in, java.io.OutputStream out)
devProtocolType
- Procol constant: T1 or T1in
- Input stream from a simulator or a TLP224 card readerout
- Output stream to a simulator or a TLP224 card readerprotected CadDevice(byte devProtocolType)
devProtocolType
- Protocol type (PCSC)Method Detail |
---|
public byte getDeviceProtocol()
public static CadClientInterface getCadClientInstance(byte protocolType, java.io.InputStream in, java.io.OutputStream out)
protocolType
- Protocol constantin
- Input stream from a simulatorout
- Output stream to a simulator
public static CadClientInterface getPCSCClientInstance(int readerNumber)
readerNumber
- PC/SC reader number (0, 1, 2...)
public void close() throws java.io.IOException
java.io.IOException
- If there is an error closing or flushing the
input or output streams.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |