-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (23 loc) · 797 Bytes
/
Main.java
File metadata and controls
26 lines (23 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.yurii.salimov.lesson06.task06;
/**
* 6.6 Написать программу копирования файла с выводом прогресса в % на консоль.
*
* @author Yuriy Salimov (yuriy.alex.salimov@gmail.com)
* @version 1.0
*/
public class Main {
public static void main(String[] args) {
try {
new Thread(getCopyFile()).start();
} catch (Exception ex) {
ex.getMessage();
}
}
private static CopyFile getCopyFile() {
final String inputFile = "c:/inputFile.txt";
final String outputFile = "c:/outputFile.txt";
final IProgress progress = new Progress();
final int blockSize = 10486760;
return new CopyFile(inputFile, outputFile, progress, blockSize);
}
}