|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jc.JCTerminal
com.ibm.jc.terminal.PCSCJCTerminal
This jct terminal sits on top of JPCSC to talk with PCSC terminals and readers. Thus, you have to have JPCSC properly installed and jpcsc.jar and its native library libjpcsc.so or jpcsc.dll must be reachable by the VM.
| Field Summary |
| Fields inherited from class com.ibm.jc.JCTerminal |
CARD_PRESENT, ERROR, NOT_CONNECTED, PROTOCOL_T0, PROTOCOL_T1, PROTOCOL_TCL, SLOT_EMPTY |
| Constructor Summary | |
PCSCJCTerminal()
|
|
| Method Summary | |
void |
close()
Close connection to card terminal. |
void |
finalize()
|
java.lang.String |
getErrorMessage()
|
int |
getState()
|
JCTerminal |
init(java.lang.Object param)
A valid argument string has the form "readername|flags" or readername|flags where reader name might be the name of a reader or "any" where the first available reader is chosen. |
void |
open()
Open the card terminal. |
byte[] |
send(int nad,
byte[] toSend,
int offset,
int len)
Send data to the card (using the negotiated protocol). |
java.lang.String |
toString()
|
byte[] |
waitForCard(int time)
Wait for insertion of a card and return ATR (answer to reset). |
| Methods inherited from class com.ibm.jc.JCTerminal |
filterFor, filterFor, generateParityError, getInstance, ioctl, pps, send, sendraw |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PCSCJCTerminal()
| Method Detail |
public JCTerminal init(java.lang.Object param)
init in class JCTerminalparam - some parameter initializing the terminal. The possible types and
meanings depend on the specific terminal. It is expected that all
terminals support at least some String based initialization.
public void finalize()
public void open()
JCTerminal
open in class JCTerminalpublic void close()
JCTerminal
close in class JCTerminalJCTerminal.open()public byte[] waitForCard(int time)
JCTerminalNote, not all terminals support the time parameter. It is only guaranteed that the call will not block longer than the specified time. It might return immediately with null.
waitForCard in class JCTerminaltime - the calls blocks for specified milliseconds.
public int getState()
getState in class JCTerminal
public byte[] send(int nad,
byte[] toSend,
int offset,
int len)
JCTerminalJCard.send() should be used)
send in class JCTerminalnad - node address to which data is being sent (high nibble = destination
address, low = source address). Address values: 2=host, 1=terminal, 0=card.
A value of 0 means from host to card.toSend - byte array containing APDU data to be sentoffset - offset starting at which APDU data sending is to beginlen - number of bytes to be transmitted
com.ibm.jc.JCard.sendpublic java.lang.String toString()
toString in class JCTerminalpublic java.lang.String getErrorMessage()
getErrorMessage in class JCTerminal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||