简体   繁体   中英

Not getting response while reading data from smart card using JavaCard and APDU

I studied all API and specification of java card and I write a code for read data from smart card. But I don't know where it return response.

The code I have written is given below.

private void readData(APDU apdu) throws ISOException
{
     byte[] buffer = apdu.getBuffer();
     short in_len1=apdu.setIncomingAndReceive();
     apdu.receiveBytes(ISO7816.OFFSET_CDATA);
}
  • smart card type = contact card
  • using java card 2.2.2 with using apdu

you have to implement the process method (similar to the main method of ac program). see also http://www.oracle.com/technetwork/java/javacard/javacard2-138597.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM