简体   繁体   English

Java Card中的内存和大容量存储功能

[英]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. 我正在开发Java Card的小卡片,我需要存储大量数据。

Concerning the card's technical key features I can read: 关于卡的技术关键功能,我可以阅读:

  • 78Ko EEPROM 78Ko EEPROM

  • Min. 闵。 2GB flash memory 2GB闪存

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. 在我的applet中,我实例化持久化字节数组以存储我的数据但是以这种方式进行处理,我使用EEPROM。

I'm discovering smart cards and I'm a little lost. 我发现了智能卡,我有点失落。

You can test if the optional package javacardx.external.MemoryAccess is implemented to gain access. 您可以测试是否实现了可选包javacardx.external.MemoryAccess以获得访问权限。 You won't be able to directly use the memory for your Applet. 您将无法直接将内存用于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. 请注意,Java Card实现主要涉及安全应用程序。 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. 制造商可能已经实施了专用API来访问闪存。 Better ask your vendor if the above solution does not work. 如果上述解决方案无效,请更好地询问您的供应商。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM