InputStream fis = new FileInputStream(sourceFile); OutputStream fos = new FileOutputStream(destFile); byte[] databuf = new byte[1024]; int length; while ((length = fis.read(databuf)) > 0) { fos.write(databuf, 0, length); } fis.close(); fos.close();
Files.copy(InputStream in, Path target, CopyOption... options)
FileUtils.copyFile(new File("in.txt"), new File("out.txt"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)