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.
public void sendBytes(short bOff,
Sends len more bytes from APDU buffer at specified offset bOff.
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??
Re: sendBytes(..,..) doubt
Wednesday, December 19, 2001 11:31 AM