System.out.println("文件所在路径为:" + savePath);// 要读取的文件的绝对路径
FileInputStream fis=new FileInputStream(savePath);
String dec = Environment.getExternalStorageDirectory().getPath()+ "/save/222.txt";
File file = new File(dec);
if(!file.exists())
file.createNewFile();
FileOutputStream out = new FileOutputStream(dec);
byte buffer[] = new byte[1024];
int count,i;
while((count=fis.read(buffer))!=-1){
// for循环保证只写入count个byte, 否则会写入1024个byte
for(i=0; i<count; i++){
out.write(buffer[i]);
}
}
fis.close();
out.close();
System.out.println("Success!");