From 08714be4b3f5be8c3b580f3c72cfea1f921c3138 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 8 Nov 2022 17:35:56 +0100 Subject: [PATCH] Actividad6 MyCopy --- .project | 17 ++++++++ .settings/org.eclipse.core.resources.prefs | 2 + .settings/org.eclipse.jdt.core.prefs | 14 +++++++ FicheroDestino.txt.txt | 0 FicheroOrigen.txt.txt | 1 + bin/dam/com/es/MyCopy.class | Bin 0 -> 1735 bytes bin/module-info.class | Bin 0 -> 145 bytes src/dam/com/es/MyCopy.java | 44 +++++++++++++++++++++ src/module-info.java | 2 + 9 files changed, 80 insertions(+) create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 FicheroDestino.txt.txt create mode 100644 FicheroOrigen.txt.txt create mode 100644 bin/dam/com/es/MyCopy.class create mode 100644 bin/module-info.class create mode 100644 src/dam/com/es/MyCopy.java create mode 100644 src/module-info.java diff --git a/.project b/.project new file mode 100644 index 0000000..ccfdf3c --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + myCopy + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8c9943d --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/FicheroDestino.txt.txt b/FicheroDestino.txt.txt new file mode 100644 index 0000000..e69de29 diff --git a/FicheroOrigen.txt.txt b/FicheroOrigen.txt.txt new file mode 100644 index 0000000..9f2c5da --- /dev/null +++ b/FicheroOrigen.txt.txt @@ -0,0 +1 @@ +Hola esto es una prueba de la copia diff --git a/bin/dam/com/es/MyCopy.class b/bin/dam/com/es/MyCopy.class new file mode 100644 index 0000000000000000000000000000000000000000..82108547e275c6209090a8d91dc63421e758aa88 GIT binary patch literal 1735 zcmZ`(T~iZh6n@^2WS4bO42cjV7{!mElGxg&EvQpLX|aJQL2MdmT{dsS!e)2f-B@$k znSM;Y?rkr6Q?Bbp;*=S$JN*~^1N{lL=iLMd1INK{@ufz6gS#u*hRGRX1zXq5Rn0ZTxqBJ*Hw}+rsBpyb41v})!(up-sT2+Z zDEY2o)nI;}HgR&sgBg7-dMz8~P@9?V@YcxRv!^_~Nf%7-OOiDbmOs7rTUW48y%} z3zpOHDL1aw6^!G&Fuy6&+wqO>JkWEkl+EjIjpTN#%bGIP^wk3H^sYuo&}VXbvK zxz>&K9`}61vO9rJV5}dLxF+H1p*EMAp3mzlu49T?Y&WRmiB2LE$wTTuH`W;$Ifem+ zsA6bV)lO%#Sq1Olri6EUs@-Fu;yqCp$q^u?B_q$kD#GSN6(0#vBoK)z%&549+f;Ze zOZBd4&Nh8cYzb#3E3*-zt@!<^;4bDQ%pQt=WmA}_xQF`$=$V{5!tTN3s)7l8qT*95 zkl-8F@QIq?%);cVjL#^NDH)5jtPA%=6%PfMBf4pO#O?_cC6x9W7mP!Pjk68Ita4Yz zV+ukk@${xv>I#4|_Ti?P$(nwZIBrjCS^R+Hi6J{iO;kWolX zYVy!+52Z%%~wUy*-Y}eVYI))KO*-xk|pKZ!c<2@MK8f5=dJq*$r3c z!aKu>4#TrzDsUde*nk=#+RoGt8PynL;V^x`fi%CSprTv_VNhhHHR%eHVs ztnat*!SxoVrz3s&=ne)G;bbHcz4J6HcTpE9?wuG+z8G62yD8GVujE#mi)xba literal 0 HcmV?d00001 diff --git a/bin/module-info.class b/bin/module-info.class new file mode 100644 index 0000000000000000000000000000000000000000..c28793ef550e0b9cecac3026ec708ac8c41bf350 GIT binary patch literal 145 zcmX^0Z`VEs1_oOOE_MbcMh5QO{FKt1RNc(Hw0uSeuHgLAqU2P!%$!t41_2}~y{yEt zL`DWSU$AOn26iAjx6(Pkpi-EDlaYZFB(0Z}Se)9xz`zJJ9s-ycn1Ku?1{MZZAT7qg O1{P*y;Aj9dAOrx7ZX6B( literal 0 HcmV?d00001 diff --git a/src/dam/com/es/MyCopy.java b/src/dam/com/es/MyCopy.java new file mode 100644 index 0000000..6164e2c --- /dev/null +++ b/src/dam/com/es/MyCopy.java @@ -0,0 +1,44 @@ +package dam.com.es; + + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +import java.io.FileOutputStream; + + +public class MyCopy { + + public static void main(String [] args) + throws FileNotFoundException, IOException, InterruptedException{ + + + File copy = new File("FicheroOrigen.txt.txt"); + + FileInputStream in = new FileInputStream(copy); + FileOutputStream out = new FileOutputStream("C:\\Users\\kevin\\MyCopy\\FicheroDestino.txt"); + + int n=0; + + System.out.println ("\nCopiando ..."); + System.out.print ("["); + byte[] completo = in.readAllBytes(); + for(int i =0; i