Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the state of an Simulator #77

Closed
frankmorgner opened this issue Oct 8, 2015 · 6 comments
Closed

Save the state of an Simulator #77

frankmorgner opened this issue Oct 8, 2015 · 6 comments

Comments

@frankmorgner
Copy link

I'd like to save the state of a Simulator with its loaded/initialized applets persistently to load them later. Unfortunately, the simulator is not serializable by ObjectOutputStream so that the following does not work on Android:

FileOutputStream fileOut = this.openFileOutput(filename, Activity.MODE_PRIVATE);
objectOut = new ObjectOutputStream(fileOut);
objectOut.writeObject(object);

I also tried Google's Gson without success:

FileOutputStream fileOut = this.openFileOutput(filename, Activity.MODE_PRIVATE);
fileOut.write(new Gson().toJson(object).getBytes());

Do you have any idea how to do this? Is there a built-in mechanism?

@licel
Copy link
Owner

licel commented Oct 20, 2015

We are working on the implementation of the transactional EEPROM in jCardSim, that will meet JavaCard standard. Unfortunately, the serialisation mechanism is not suitable for saving jCardSim’s state, not only from technical point of view, but also because of the architectural principles. We will definitely let you know once it is ready

@frankmorgner
Copy link
Author

Thanks for looking into it!

@eriknellessen
Copy link

In the meantime, a solution as described in this pdf (pages 32 and following) and implemented in this file might work for you.

@frankmorgner
Copy link
Author

unfortunately re-personalizing is not generally applicable

@frankmorgner
Copy link
Author

@licel, I just realize it's been one year this is open. Did you make any progress or do you need more details?

@licel
Copy link
Owner

licel commented Oct 21, 2020

fixed #162

@licel licel closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants