아래와같이 m_image_bitmap 에있는 data를 저장하려고하는데
openFileOutput에서 자꾸 Exception 으로 빠져버리네요...
코드에 문제가 있는지요?
boolean SaveImage()
{
String StoragePath = Environment.getExternalStorageDirectory().getAbsolutePath();
String savePath = StoragePath + "/coffee/";
File f = new File(savePath);
if(!f.isDirectory())
{
f.mkdirs();
}
try{
String path = savePath + m_strFile;
FileOutputStream fos = openFileOutput(path, Context.MODE_WORLD_WRITEABLE);
String str = "tttt";
m_image_bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.flush();
fos.close();
return true;
}catch (Exception e){
e.printStackTrace();
return false;
}
}