【发布时间】:2011-10-02 08:36:59
【问题描述】:
我正在尝试为黑莓编写一个应用程序并且我正在使用持久存储,但是当我重新启动设备时,数据丢失了。有人知道为什么会这样吗?
提前感谢大家!
public static void add(Subscription s) throws IOException {
Vector subscriptions = SubscriptionsController.getSubscriptions();
if(subscriptions == null) subscriptions = new Vector();
subscriptions.addElement(s);
synchronized(SubscriptionsController.persistedSubscriptions) {
SubscriptionsController.persistedSubscriptions.setContents(subscriptions);
SubscriptionsController.persistedSubscriptions.commit();
}
}
【问题讨论】:
-
请发布您正在使用的代码
-
@seand,我上面发布的代码实际保存了。
标签: blackberry java-me blackberry-eclipse-plugin persistent-storage