Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

confused with the API methods

JavaCard Applet Development Related Questions and Answers.
jbsoft
Posts: 11
Joined: Tue May 03, 2016 3:37 am
Points :140
Contact:

confused with the API methods

Post by jbsoft » Mon Jun 13, 2016 3:57 am

I am a little confused with the methods receiveBytes(short bOff) and sendBytesLong(byte[] outData, short bOff, short len).

1. receiveBytes(short bOff)
For this method, is it used to receive data and put it into APDU buffer, starting at the offset bOff?

2.sendBytesLong(byte[] outData, short bOff, short len)
Why does this method send data directly from the array "outData"? Don't you need to copy it into APDU buffer firstly?

Thanks

cprgolds
Posts: 8
Joined: Thu Jan 14, 2016 4:31 am
Points :68
Contact:

Re: confused with the API methods

Post by cprgolds » Mon Jun 13, 2016 5:46 am

receiveBytes(short bOff) is to receive data from card OS and store it in APDU buffer.

You can send byte array directly via sendBytesLong(byte[] outData, short bOff, short len). I mean you don't have to copy data to APDU buffer first.

notuo
Posts: 12
Joined: Thu Jan 14, 2016 4:45 am
Points :143
Contact:

Re: confused with the API methods

Post by notuo » Wed Jun 15, 2016 1:30 am

receiveBytes(short bOff) method retrieves data from the card OS and populates the APDU buffer.

You don't have to copy data to APDU buffer because the JCRE does the copy for you.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 56 guests

JavaCard OS : Disclaimer