java copyFile
java copyFile
public static void copyFile(File oldFile,File newFile) throws IOException{ FileInputStream fis = new FileInputStream(oldFile); FileOutputStream fos = new FileOutputStream(newFile); int index=0; byte[] bytes = new byte[1024]; while((index=fis.read(bytes))!=-1) { fos.write(bytes, 0, index); } fos.flush(); fos.close(); fis.close(); }
##########################
QQ 3087438119