"NFC java card reader" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "NFC java card reader" answered properly. Developers are finding an appropriate answer about NFC java card reader related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like NFC java card reader. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on NFC java card reader.
NFC java card reader
import java.util.List;
import javax.smartcardio.*;
public class Blog {
public static void main(String[] args) {
try {
// Display the list of terminals
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals = factory.terminals().list();
System.out.println("Terminals: " + terminals);
// Use the first terminal
CardTerminal terminal = terminals.get(0);
// Connect wit hthe card
Card card = terminal.connect("*");
System.out.println("card: " + card);
CardChannel channel = card.getBasicChannel();
// Send Select Applet command
byte[] aid = {(byte)0xA0, 0x00, 0x00, 0x00, 0x62, 0x03, 0x01, 0x0C, 0x06, 0x01};
ResponseAPDU answer = channel.transmit(new CommandAPDU(0x00, 0xA4, 0x04, 0x00, aid));
System.out.println("answer: " + answer.toString());
// Send test command
answer = channel.transmit(new CommandAPDU(0x00, 0x00, 0x00, 0x00));
System.out.println("answer: " + answer.toString());
byte r[] = answer.getData();
for (int i=0; i<r.length; i++)
System.out.print((char)r[i]);
System.out.println();
// Disconnect the card
card.disconnect(false);
} catch(Exception e) {
System.out.println("Ouch: " + e.toString());
}
}
}
Source: ludovicrousseau.blogspot.com
All those coders who are working on the Whatever based application and are stuck on NFC java card reader can get a collection of related answers to their query. Programmers need to enter their query on NFC java card reader related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about NFC java card reader for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of NFC java card reader while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "NFC java card reader". Visit this developer's friendly online web community, CodeProZone, and get your queries like NFC java card reader resolved professionally and stay updated to the latest Whatever updates.