From a659145b5ec861e0c3490e4dc1496769de6dc4ba Mon Sep 17 00:00:00 2001 From: vigliom Date: Mon, 10 Oct 2022 00:22:43 +0200 Subject: [PATCH] . --- bin/jorpelu/com/MyCopy.class | Bin 2844 -> 2833 bytes src/jorpelu/com/MyCopy.java | 68 +++++++++++++++-------------------- 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/bin/jorpelu/com/MyCopy.class b/bin/jorpelu/com/MyCopy.class index 1a3ebbdadeb7681fbe348134f9a851e37ce63710..85b871428168074df6442224e8ebc6e3a5e35b0b 100644 GIT binary patch literal 2833 zcmaJ@Yi|@)7=BLoGSlgFElZcODp*vY1=I93#YD!QNNk_#wF^@Uf&xwB#(pD_GxDQ}!QpW;;|eJI&Ae;m4S`sH zt<_NFbGJZvla;sJ9)Unx`;b7e*Up+60%*{oKovNv-^!Z<#ff3l*=Y>tOos2bGe&O6 za4h*={TOt|tVw}pUzAF23=*6$th~UYwj28Ab4qk2 zEz3@9vvTHu?QXM+`Rpkj1&ah0&Z+bb)(930=yL*TtKw{a>D-$#a#q&p%o?tS7Mv?< zTS83QPM3~~^91T$^PpRpGgzkMd|W`V%!AgX%Q^|x9_eYhjuleSm~l+QH3!TCGOB_$ zUpFe1s#ql;I#jITvR6eXmpfEk#3i9%oj^-%=6(4>(WRkjOlVk(^)ls41Qt|Nu3|&< z6kJ+ky47$EpJ@^srD>PI;(5~=4bQ_SN^64;7TucY-B_>SvKkc`#IMqWD`b={0`d7M zwJKhit#fTFx>hc6h2t1g{lrs4FBoJB zc1`<`hCSG;;0A%EUJl-*_2pgDaf$`koF}M`8@oj`g>vN7{@L2X=Lfk$L-2- z&@DOJ3*wpgQkb-EV_a5OA)Z%Gg{oVMRxWEg8dkzffsBv&16PMvgN<`l>?enp%l$ze zQ@D+TViXEyo@sQPZp3N|@Wo>pHtx`IC+-qZUArRWsnS+kb2YSzdl>a{+4=i)+%Fp( z@&H%y00sM0JR|^F@FO}N#bE+7YDxn63#mdQoA9`fCnPW`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mi3)O|Ns<;!If9d+w}b@%r}^WOqr~ zr3xvBL7--gbwNo^!?UIv3r9+_ABcOzN-?SpB@K&h%&{Z)4;hD2xx8iA3>+aY)q2Iu zAr6heQw7#Znh|a~a9%JLVMeNqR5m@6kgn!9YjDs?bCq;eGt-T<+l@;+XU_yG@DL^) ziSuXimtsbT3nL>Y`}T}))suiig4Lwub9TziI>s1-AXq*vRZz}JFU9KJ>Dy=I-9#$* zK;Bp9WJ1An)Sk!{s9p|Pfx6N~wo&rpQV=w6JaA>D!Oy1xcvW~2;%0LF9Mtyj;SbgI z&!axsK8HZeE2#~V@^ZsclczH^nMFY=6RuM<08%4M=9GqGBBOE+) zkX<|org+ zW{%lzaU=U$u7iB{;5ZZVKJP$4XCfM)B7izHBFv<;@VO2vD7z9Jcp6vYIdY%GM!bzEKA_E0-1`!n@g2v^kLbj2)bb~`;csjeUc^Kl zxa5tfmp9>rs* zajD0-=i$djH=e+g^r=O}@DwQ@eees7 z;$_s*yYKM|Ugd;6j&JcAUT17h;A^}=N~in^`uaM*Z$2hZiFz8R@h0A4B)=ifw|N?% zHWTlV3gUN0^j%Vow7*EjT~zNurLQG?DrV^3?+7f=oL7NRuv)?Ud;$xMyT5WvK|TK^ zPqTjk`w%$yP{D@^S{1Y_=uogl2r|c{s^u5N&DglyD=&znwW$D diff --git a/src/jorpelu/com/MyCopy.java b/src/jorpelu/com/MyCopy.java index 34d489b..cd95e76 100644 --- a/src/jorpelu/com/MyCopy.java +++ b/src/jorpelu/com/MyCopy.java @@ -1,76 +1,64 @@ package jorpelu.com; import java.io.*; +import java.io.File; import java.util.ArrayList; +import java.util.Scanner; -import javax.swing.JFrame; -import javax.swing.JPanel; - -public class MyCopy { +public class MyCopy { + Ventana ventana; - public MyCopy(String RutaIn, JFrame jf, String RutaOut){ - - if(RutaOut==null) { - RutaOut = "."; - } - File fich = new File(RutaOut); - File fich_a_copiar = new File(RutaIn); - - + public static void main(String[] args) throws FileNotFoundException, IOException { + File fich = new File(".\\Salida.dat"); + File fich_a_copiar = new File("textp.dat"); if(fich_a_copiar.exists() == false) { - try { - fich_a_copiar.createNewFile(); - } catch (IOException e) { - - e.printStackTrace(); - } + fich_a_copiar.createNewFile(); } String[] calculando = {"-", "\\", "|", "/"}; - FileInputStream in; - try { - in = new FileInputStream(fich_a_copiar); - + FileInputStream in = new FileInputStream(fich_a_copiar); DataInputStream din = new DataInputStream(in); FileOutputStream out = new FileOutputStream(fich); DataOutputStream dout = new DataOutputStream(out); - int cal=0; int i=0; int c; ArrayList bufferin = new ArrayList(); - while((c =din.read()) != -1 && bufferin.add(c)) { + while((c = din.read() ) != -1 && bufferin.add(c)) { System.out.println(calculando[cal]); cal++; if (cal >= 4) cal = 0; + + try { + Thread.sleep(100); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } for(int j = 0; j