I'm trying to write a data parsing class in Javacard and I want to store a transient pointer to the data buffer inside the class instance, so I don't have to keep passing the array, offset and length every call.
An example of how it would be used is:
Code: Select all
DataParser parser = new DataParser(); // Created in the Applet constructor
parser.setData(buffer, offset, length);
byte a = parser.readNextByte();
short b = parser.readNextShort();
short c = parser.readNextShort();
Is there any way in Javacard for a class to store a reference to a byte array without it being persistent?
Thanks,
kos