bytes保留成图片存入sdcard卡中

bytes保存成图片存入sdcard卡中bytespbWk;//Android获取sdcard卡的根路径String SDPATH Environment.get

bytes保存成图片存入sdcard卡中
bytes  pbWk;
//Android获取sdcard卡的根路径
String SDPATH = Environment.getExternalStorageDirectory() + "/";
Log.i("log","logpath............."+SDPATH);
try{
File file=new File(SDPATH+i+"save.png");
file.createNewFile();
FileOutputStream fos = null;
fos=new FileOutputStream(file);

fos.write(pbWk, 0, pbWk.length);
fos.flush();
fos.close();
}catch(Exception ec){
ec.printStackTrace();
}