commit df6d56c46ca6e11ef8bc11744f2bd228f15d1f19 Author: AntonioFrische Date: Fri Oct 7 17:28:37 2022 +0200 finish diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..b078173 --- /dev/null +++ b/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..c7a09a0 --- /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..b635231 --- /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=18 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=18 +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=18 diff --git a/bin/com/antoniofrische/MyCopy.class b/bin/com/antoniofrische/MyCopy.class new file mode 100644 index 0000000..a9891a0 Binary files /dev/null and b/bin/com/antoniofrische/MyCopy.class differ diff --git a/bin/module-info.class b/bin/module-info.class new file mode 100644 index 0000000..7c0ba8c Binary files /dev/null and b/bin/module-info.class differ diff --git a/src/com/antoniofrische/MyCopy.java b/src/com/antoniofrische/MyCopy.java new file mode 100644 index 0000000..0df4380 --- /dev/null +++ b/src/com/antoniofrische/MyCopy.java @@ -0,0 +1,36 @@ +package com.antoniofrische; + +import java.io.*; + +public class MyCopy { + public static void main(String [] args) + throws FileNotFoundException, IOException, InterruptedException{ + + File acopy = new File("C:\\Users\\AntonioFrische\\OneDrive - ABACCO Solutions\\Documents\\Schule_22_23_CFGS\\Acceso_Datos\\SpringTool_4\\contents\\sts-4.16.0.RELEASE\\Arch\\copy.txt"); + + FileInputStream in = new FileInputStream(acopy); + FileOutputStream out = new FileOutputStream("C:\\Users\\AntonioFrische\\OneDrive - ABACCO Solutions\\Documents\\Schule_22_23_CFGS\\Acceso_Datos\\SpringTool_4\\contents\\sts-4.16.0.RELEASE\\Arch\\salida.txt"); + + int n=0,c = 0; + double percent = 0; + double steps = 1.0; + System.out.println ("Copiando ..."); + System.out.print("["); + byte[] complet = in.readAllBytes(); + for(int i = 0; i < complet.length; i++) { + n = n+complet[i]; + } + + for(int i = 0; i < complet.length; i++) { + Thread.sleep(500); + out.write(complet[i]); + if(i > 0.5) { + System.out.print("-"); + } + } + System.out.println("]"); + in.close(); + out.close(); + System.out.println ("Se han copiado "+complet.length+" caracteres\n"); + } +} diff --git a/src/module-info.java b/src/module-info.java new file mode 100644 index 0000000..fdd6196 --- /dev/null +++ b/src/module-info.java @@ -0,0 +1,2 @@ +module MyCopy { +} \ No newline at end of file