Browse Source

Añadido codigo copia

master
jandroalbus 2 years ago
parent
commit
cdef29f7d6
2 changed files with 11 additions and 0 deletions
  1. BIN
      MiCopyFicheros/bin/MiCopyFicheros/MiCopyFicheros.class
  2. +11
    -0
      MiCopyFicheros/src/MiCopyFicheros/MiCopyFicheros.java

BIN
MiCopyFicheros/bin/MiCopyFicheros/MiCopyFicheros.class View File


+ 11
- 0
MiCopyFicheros/src/MiCopyFicheros/MiCopyFicheros.java View File

@ -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);


Loading…
Cancel
Save