Christmas is coming soon! To thank for the support from all our dear customers, Christmas promotional activity is going on in JavaCardOS online store. For more activities details, please check this post.

How to store java primitive types contents in RAM

Communication

Moderator: UNKNwYSHSA

Diorin
Posts: 17
Joined: Thu Nov 26, 2015 4:08 am
Points :137
Contact:

How to store java primitive types contents in RAM

Post by Diorin » Mon Mar 07, 2016 4:25 am

I have finished some java classes which contains some java primitive types(e.g. short, boolean). Because these contents are stored in EEPROM, it slows down my applet. I want to know how to store these contents in RAM in order to speed up my applet.

popmun09
Posts: 36
Joined: Tue Feb 16, 2016 9:49 pm
Points :230
Contact:

Re: How to store java primitive types contents in RAM

Post by popmun09 » Wed Mar 16, 2016 5:00 am

In order to store volatile objects, you can put the attributes in a transient array.
There is support for different types, e.g. boolean, byte and short.
The usual technique is to map values in a single transient byte array.

See the documentation about makeTransientByteArray in the JCSytem class.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 2 guests

JavaCard OS : Disclaimer