使用J2ME存储大量数据的最佳实践 [英] Best practice for storing large amounts of data with J2ME

查看:82
本文介绍了使用J2ME存储大量数据的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个J2ME应用程序,它有大量数据存储在设备上(在1MB但可变的区域内)。我不能依赖文件系统,因此我陷入了记录管理系统(RMS),它允许多个记录存储但每个都有有限的大小。我的初始目标平台Blackberry将每个平台限制为64KB。

I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, limits each to 64KB.

我想知道是否还有其他人必须解决在RMS中存储大量数据的问题以及他们如何管理它?我想要计算记录大小并在多个商店中分割一个数据集,如果它太大,但这增加了很多复杂性以保持它完整。

I'm wondering if anyone else has had to tackle the problem of storing a large amount of data in the RMS and how they managed it? I'm thinking of having to calculate record sizes and split one data set accross multiple stores if its too large, but that adds a lot of complexity to keep it intact.

存储了许多不同类型的数据,但只有一组特别会超过64KB限制。

There is lots of different types of data being stored but only one set in particular will exceed the 64KB limit.

推荐答案

对于任何过去的事情几千字节,您需要使用JSR 75或远程服务器。即使在一些较高端的手机中,RMS记录的大小和速度也非常有限。如果您需要在J2ME中处理1MB数据,唯一可靠,可移植的方法是将其存储在网络上。始终支持HttpConnection类和GET和POST方法。

For anything past a few kilobytes you need to use either JSR 75 or a remote server. RMS records are extremely limited in size and speed, even in some higher end handsets. If you need to juggle 1MB of data in J2ME the only reliable, portable way is to store it on the network. The HttpConnection class and the GET and POST methods are always supported.

在支持JSR 75 FileConnection的手机上,它可能是有效的替代方案但没有代码签名就是用户体验恶梦。几乎每个API调用都会在没有一揽子权限选择的情况下调用安全提示。使用JSR 75部署应用程序的公司通常需要为每个端口提供六个二进制文件,以便覆盖一小部分可能的证书。这只是制造商证书;有些手机只有运营商锁定的证书。

On the handsets that support JSR 75 FileConnection it may be valid alternative but without code signing it is an user experience nightmare. Almost every single API call will invoke a security prompt with no blanket permission choice. Companies that deploy apps with JSR 75 usually need half a dozen binaries for every port just to cover a small part of the possible certificates. And this is just for the manufacturer certificates; some handsets only have carrier-locked certificates.

这篇关于使用J2ME存储大量数据的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆