Close
jGuru Forums
Posted By: Anonymous Posted On: Tuesday, December 18, 2001 05:58 AM
I have been trying to create a applet in which I echo the parameters received. I was referring the HelloWorld example in which I am not able to understand a particular section. The HelloWorld ex uses apdu.setOutgoingLength( (short) (echoOffset + 5) ); On the next line the following command is invoked apdu.sendBytes( (short)0, (short) 5); I am attaching an excerpt from the API document related to sendBytes method. =======API DOcument============== public void sendBytes(short bOff, short len) throws APDUException Sends len more bytes from APDU buffer at specified offset bOff. =======API DOcument============== I am not able to get a clear picture of what sendBytes is attempting to do in the example. If it sends the bytes from an offset (0)till the given point then shouldnt the sendBytes method in HelloWorld use sendBytes(0,echoOffset + 5) instead of (0,5)??? Also, what is the purpose of adding 5 to the echoOffset?? Thanks, Ashutosh
Re: sendBytes(..,..) doubt
Posted By: Joseph_Smith Posted On: Wednesday, December 19, 2001 11:31 AM