Raoul722
Raoul722

Reputation: 1264

Memory and mass storage capability in Java Card

I am developing a cardlet in Java Card and I need to store a lot of data.

Concerning the card's technical key features I can read:

My question concerns the flash memory access : How to store datas into it ?

In my applet, I instantiate persistants byte arrays to store my datas but proceding this way, I use the EEPROM.

I'm discovering smart cards and I'm a little lost.

Upvotes: 3

Views: 614

Answers (1)

Maarten Bodewes
Maarten Bodewes

Reputation: 94048

You can test if the optional package javacardx.external.MemoryAccess is implemented to gain access. You won't be able to directly use the memory for your Applet.

To you use it you would probably have to execute something similar to:

javacardx.external.Memory.getMemoryAccessInstance(MEMORY_TYPE_EXTENDED_STORE,  short[] memorySize, short memorySizeOffset)

Note that the Java Card implementation is mainly concerned with security applications. Storing data directly in unprotected flash is probably not the way to go.

The manufacturer may have implemented a proprietary API to access the flash. Better ask your vendor if the above solution does not work.

Upvotes: 4

Related Questions