void CopyImage(){
try {
String filePath ="/users/yifei/desktop/assets/timg.gif";
File f = new File(filePath);
f.setWritable(true);
f.setReadable(true);
FileInputStream fis = new FileInputStream(f);
FileOutputStream fos = new FileOutputStream("/users/yifei/desktop/assets/timeg1.gif");
int n =0;
byte[] b = new byte[2048];
int i = 0;
while((n=fis.read())!=-1) {//读出并写入
fos.write(n);
}
System.out.println(“123”);
fis.close();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}