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);
}
you have to implement the process method (similar to the main method of a c program). see also http://www.oracle.com/technetwork/java/javacard/javacard2-138597.html