import
java.io.IOException;
import
java.io.File;
import
java.io.FileInputStream;
import
java.io.FileOutputStream;
import
java.nio.channels.FileChannel;
import
java.nio.file.CopyOption;
import
java.nio.file.StandardCopyOption;
import
java.nio.file.Paths;
import
java.nio.file.Path;
import
java.nio.file.Files;
public
static
void
copyFile_Java7(String origen, String destino)
throws
IOException {
Path FROM = Paths.get(origen);
Path TO = Paths.get(destino);
CopyOption[] options =
new
CopyOption[]{
StandardCopyOption.REPLACE_EXISTING,
StandardCopyOption.COPY_ATTRIBUTES
};
Files.copy(FROM, TO, options);
}