public void saveMyBitmap(String bitName, Bitmap mBitmap) {
File f = new File(Constants.imagePath + bitName + ".png");
try {
f.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
Log.w("Debug", "save ---" + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new java.util.Date()));
mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
Log.w("Debug", "save ---" + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new java.util.Date()));
fOut.flush();
fOut.close();
} catch (IOException e) {
e.printStackTrace();
}
}用这个方法,存的图片一两兆,但是两句log时间间隔一分多两分钟,这个时间太长了 存东西用不了这么长的时间啊,难道我的方法用错了?大大们求解啊
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货