|
|
@ -19,11 +19,22 @@ public class MiCopyFicheros { |
|
|
|
|
|
|
|
System.out.println("\n> Empezando copia ..."); |
|
|
|
|
|
|
|
int c; |
|
|
|
|
|
|
|
for (int i = 0; i <= 200; i = i + 20) { |
|
|
|
|
|
|
|
//Invocamos al metodo |
|
|
|
progressPercentage(i, 200); |
|
|
|
|
|
|
|
//Copiamos |
|
|
|
try { |
|
|
|
while ((c = in.read()) != -1) { |
|
|
|
out.write(c); |
|
|
|
} |
|
|
|
} catch (IOException e1) { |
|
|
|
//Ignora |
|
|
|
} |
|
|
|
|
|
|
|
//Ralentizamos el output |
|
|
|
try { |
|
|
|
Thread.sleep(1000); |
|
|
|