2010年4月22日 星期四

如何儲存一個檔案

try {
    FileOutputStream fOut = openFileOutput("test.txt", MODE_WORLD_READABLE);
    OutputStreamWriter osw = new OutputStreamWriter(fOut);
    osw.write(new String("1234567890 Test"));
    osw.flush();
    osw.close();
} catch (IOException ioe) {
    ioe.printStackTrace();
}

沒有留言:

張貼留言