文件中的黑莓处理 [英] File handling in blackberry

查看:131
本文介绍了文件中的黑莓处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能以附加模式打开黑莓文件?在连接器类有常数读,写,READ_WRITE但我没有找到任何常数追加模式。

Is it possible to open file in append mode in blackberry? In Connector class there are constants READ, WRITE, READ_WRITE but I didn't find any constant for append mode.

推荐答案

这是可能的,但它不是一个独立的模式:

It is possible, though it isn't a separate mode:

FileConnection fc = (FileConnection) Connector.open(pathToFile, Connector.READ_WRITE);
OutputStream out = fc.openOutputStream(fc.fileSize());
// Now you can write to the output stream and it will append to the end of the file

这篇关于文件中的黑莓处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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