Here you can find the source of copy(File copied, File destination)
public static void copy(File copied, File destination) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.nio.file.Files; public class Main { public static void copy(File copied, File destination) throws Exception { try {//w w w .j av a 2 s .c om Files.copy(copied.toPath(), destination.toPath()); } catch (IOException e) { throw new Exception(copied.toString() + ": Can't copy"); } } }