I am new to java card.
i have this code…..so please tell me how to read data from smart card using java card
private void readName(APDU apdu) throws ISOException
{
byte[] apduBuffer = apdu.getBuffer();
for (byte i=0; i<userName.length; i++)
{
apduBuffer[5+i] = userName[(byte)i] ;
}
apdu.setOutgoing();
apdu.setOutgoingLength((short)userName.length);
apdu.sendBytes((short)5, (short)userName.length);
}
The common mechanism to read data from files in smart card is: