2012-05-29 19 views
2

我使用的是諾基亞3120,我想將拍攝的圖像保存在手機內存中,但是當我保存圖像時,它會給出異常安全Java/lang/SecurityException訪問被拒絕。如何將拍攝的圖像保存在圖庫文件夾或手機內存中?

我的代碼,

FileConnection fileConn = null; 
     DataOutputStream dos = null; 

     try { 
      fileConn = (FileConnection) Connector.open(
        "file:///C:/story123.jpg"); /*//"file:///root1/story123.jpeg");*/ 
      if (!fileConn.exists()) { 
       fileConn.create(); 
      } 
      dos = new DataOutputStream(fileConn.openOutputStream()); 
      dos.write(photo); 
      dos.flush(); 
      dos.close(); 
      fileConn.close(); 

     } catch (IOException ioe) { 
      System.out.println("Error!" + ioe); 
     } 
+0

看到,手機不支持Java/J2ME,讀[目錄規格](http://www.gsmarena.com/nokia_3210-6.php)。 – Lucifer

回答

相關問題