1 // CopyFileSimple.java
2
3 import java.io.IOException;
4 import java.nio.file.Files;
5 import java.nio.file.Path;
6 import java.nio.file.Paths;
7
8 /** 9 * CopyFile zeigt den Umgang mit File-Streams. 10 * @author H.Drachenfels 11 * @version 10.1.2019 12 */
13 public final class CopyFileSimple {
14 private CopyFileSimple() { }
15
16 /** 17 * Kopiert eine Datei. 18 * @param args Quell- und Zieldateinamen 19 * @throws IOException bei Dateizugriffsfehlern 20 */
21 public static void main(String[] args) throws IOException {
22 Path in = Paths.get(args[0]);
23 Path out = Paths.get(args[1]);
24 Files.copy(in, out);
25 }
26 }
27