0
我試圖從FileConnection中將一些數據寫入DataOutputStream。來自FileConnection編碼的J2ME DataOutputStream
FileConnection con = (FileConnection)Connector.open("file:///C:/file.txt");
if (!con.exists())
con.create();
DataOutputStream out = con.openDataOutputStream();
out.writeUTF("some text");
out.close();
con.close();
但是,而不是我輸入的文本,我收到一些垃圾在文件中 - 就像有一些編碼問題。
好的,從我可以看到它在文件開始處添加空和0xFF符號。
可能是什麼原因?