public static void copyFile(File from, File to) throws IOException { final InputStream input = new FileInputStream(from); final OutputStream output = new FileOutputStream(to); // get an channel from the stream copyStreams(input, output); }
public static void copyFile(String from, String to) throws IOException { final InputStream input = new FileInputStream(from); final OutputStream output = new FileOutputStream(to); try { // get an channel from the stream copyStreams(input, output); } finally { input.close(); output.close(); } }