[代码]android文件保存范例一
try
{
//保存路径
p = "/sdcard/" + "test" + ".png";
//创建文件
f = new File(p);
f.createNewFile();
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
mWorkingBitmap.compress(Bitmap.CompressFormat.PNG,100,fOut);
fOut.flush();
fOut.close();
}
catch(FileNotFoundException e)
{
e.printStackTrace();
}
catch(IOException e)
{
e.printStackTrace();
}
浙公网安备 33010602011771号