From fc8687cc341a8db4ffa34faad49a81347f8209f0 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 12 Dec 2023 13:01:40 +0100 Subject: [PATCH] Alle Klassen --- Blatt3/src/tool/DirectoryCompressor.java | 20 ++++++++++++++++++++ Blatt3/src/tool/DirectoryDecompressor.java | 20 ++++++++++++++++++++ Blatt3/src/tool/DirectoryToolBase.java | 11 +++++++++++ Blatt3/src/tool/FileCompressor.java | 19 +++++++++++++++++++ Blatt3/src/tool/FileDecompressor.java | 19 +++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 Blatt3/src/tool/DirectoryCompressor.java create mode 100644 Blatt3/src/tool/DirectoryDecompressor.java create mode 100644 Blatt3/src/tool/DirectoryToolBase.java create mode 100644 Blatt3/src/tool/FileCompressor.java create mode 100644 Blatt3/src/tool/FileDecompressor.java diff --git a/Blatt3/src/tool/DirectoryCompressor.java b/Blatt3/src/tool/DirectoryCompressor.java new file mode 100644 index 0000000..18250a6 --- /dev/null +++ b/Blatt3/src/tool/DirectoryCompressor.java @@ -0,0 +1,20 @@ +package tool; + +import java.io.File; +import java.io.FileFilter; + +/** + * Compresses the content of a directory. + */ +public class DirectoryCompressor extends DirectoryToolBase { + + public static void main(String[] args) throws Exception { + + if (args.length != 1) { + System.err.println("Bitte geben Sie ein Verzeichnis an."); + System.exit(1); + } + + // TODO: Methode implementieren + } +} \ No newline at end of file diff --git a/Blatt3/src/tool/DirectoryDecompressor.java b/Blatt3/src/tool/DirectoryDecompressor.java new file mode 100644 index 0000000..570644f --- /dev/null +++ b/Blatt3/src/tool/DirectoryDecompressor.java @@ -0,0 +1,20 @@ +package tool; + +import java.io.File; +import java.io.FileFilter; + +/** + * Decompresses the content of a directory. + */ +public class DirectoryDecompressor extends DirectoryToolBase { + + public static void main(String[] args) throws Exception { + + if (args.length != 1) { + System.err.println("Bitte geben Sie ein Verzeichnis an."); + System.exit(1); + } + + // TODO: Methode implementieren + } +} diff --git a/Blatt3/src/tool/DirectoryToolBase.java b/Blatt3/src/tool/DirectoryToolBase.java new file mode 100644 index 0000000..6e39738 --- /dev/null +++ b/Blatt3/src/tool/DirectoryToolBase.java @@ -0,0 +1,11 @@ +package tool; + +import java.io.File; + +/** + * Base class for all directory based tools. + */ +public class DirectoryToolBase { + + // TODO: Gemeinsame Methoden für DirectoryCompressor und DirectoryDecompressor +} \ No newline at end of file diff --git a/Blatt3/src/tool/FileCompressor.java b/Blatt3/src/tool/FileCompressor.java new file mode 100644 index 0000000..a36a2b2 --- /dev/null +++ b/Blatt3/src/tool/FileCompressor.java @@ -0,0 +1,19 @@ +package tool; + +import compressor.CompressingOutputStream; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * Compresses a single file or stdin. + */ +public class FileCompressor { + + public static void main(String... args) throws Exception { + + // TODO: Methode implementieren + } +} \ No newline at end of file diff --git a/Blatt3/src/tool/FileDecompressor.java b/Blatt3/src/tool/FileDecompressor.java new file mode 100644 index 0000000..98d6308 --- /dev/null +++ b/Blatt3/src/tool/FileDecompressor.java @@ -0,0 +1,19 @@ +package tool; + +import compressor.DecompressingInputStream; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * Decompresses a single file or stdin. + */ +public class FileDecompressor { + + public static void main(String... args) throws Exception { + + // TODO: Methode implementieren + } +} \ No newline at end of file