sendBytesLong()
Posted: Thu Jun 30, 2016 4:20 am
In the introduction of APDU in Java card API document, it shows "For sending large byte arrays as response data, the APDU class provides a special method sendBytesLong() which manages the APDU buffer." But how does it help to send large byte arrays? Why is this method to manage the APDU buffer? I can not see any useful information.
Here is the description of sendBytesLong
Here is the description of sendBytesLong
public void sendBytesLong(byte[] outData,
short bOff,
short len)
throws APDUException,
SecurityException
Sends len more bytes from outData byte array starting at specified offset bOff.
If the last of the response is being sent by the invocation of this method, the APDU buffer must not be altered. If the data is altered, incorrect output may be sent to the CAD. Requiring that the buffer not be altered allows the implementation to reduce protocol overhead by transmitting the last part of the response along with the status bytes.
The Java Card runtime environment may use the APDU buffer to send data to the CAD.