Znalazłem w necie kawałek kodu:
public void Test (){
try {
// show the list of available terminals
TerminalFactory factory = TerminalFactory.getDefault();
List terminalList = factory.terminals().list();
//List numbers of Card readers
for (int i=0; i < terminalList.size(); i++){
System.out.println("CardReader N?: " + i + " " + terminalList.get(i));
}
// take the first terminal in the list
terminal = (CardTerminal) terminalList.get(0);
System.out.println("Please insert card...");
terminal.waitForCardPresent (10000);
// establish a connection with the card
Card card = terminal.connect("T=1");
System.out.println("card: " + card);
channel = card.getBasicChannel();
//reset the card
ATR atr = card.getATR();
//SEND YOUR APDU COMMANDS HERE....
card.disconnect(false);
}
catch (Exception ex) {
System.out.println("Exception : " + ex);
}
}
Kod znajduje kartę wyświetla informacje o niej, co dalej mogę z tym zrobić? Podajcie proszę jakieś przykłady.