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