From b6a5946f9e09e6a0f6149ee5eede59eef7dccd24 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 10 Apr 2019 18:55:40 +0200 Subject: [PATCH] Move some classes and interfaces --- src/de/mas/wiiu/jnus/DecryptionService.java | 2 +- src/de/mas/wiiu/jnus/ExtractionService.java | 2 +- src/de/mas/wiiu/jnus/NUSTitle.java | 3 ++- src/de/mas/wiiu/jnus/NUSTitleLoader.java | 2 +- .../mas/wiiu/jnus/implementations/NUSDataProviderLocal.java | 1 + .../wiiu/jnus/implementations/NUSDataProviderLocalBackup.java | 1 + .../mas/wiiu/jnus/implementations/NUSDataProviderRemote.java | 1 + src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java | 1 + .../mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java | 1 + .../wiiu/jnus/implementations/wud/parser/WUDInfoParser.java | 2 +- .../wiiu/jnus/{ => interfaces}/InputStreamWithException.java | 2 +- .../jnus/{implementations => interfaces}/NUSDataProvider.java | 2 +- src/de/mas/wiiu/jnus/utils/DataProviderUtils.java | 2 +- src/de/mas/wiiu/jnus/{ => utils}/FSTUtils.java | 4 +--- .../wiiu/jnus/{ => utils}/PipedInputStreamWithException.java | 4 ++-- 15 files changed, 17 insertions(+), 13 deletions(-) rename src/de/mas/wiiu/jnus/{ => interfaces}/InputStreamWithException.java (96%) rename src/de/mas/wiiu/jnus/{implementations => interfaces}/NUSDataProvider.java (97%) rename src/de/mas/wiiu/jnus/{ => utils}/FSTUtils.java (96%) rename src/de/mas/wiiu/jnus/{ => utils}/PipedInputStreamWithException.java (96%) diff --git a/src/de/mas/wiiu/jnus/DecryptionService.java b/src/de/mas/wiiu/jnus/DecryptionService.java index e0bf16c..34ad8ad 100644 --- a/src/de/mas/wiiu/jnus/DecryptionService.java +++ b/src/de/mas/wiiu/jnus/DecryptionService.java @@ -35,7 +35,7 @@ import de.mas.wiiu.jnus.entities.TMD; import de.mas.wiiu.jnus.entities.Ticket; import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.entities.fst.FSTEntry; -import de.mas.wiiu.jnus.implementations.NUSDataProvider; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.CheckSumWrongException; import de.mas.wiiu.jnus.utils.FileUtils; import de.mas.wiiu.jnus.utils.HashUtil; diff --git a/src/de/mas/wiiu/jnus/ExtractionService.java b/src/de/mas/wiiu/jnus/ExtractionService.java index c88ca22..2453533 100644 --- a/src/de/mas/wiiu/jnus/ExtractionService.java +++ b/src/de/mas/wiiu/jnus/ExtractionService.java @@ -29,7 +29,7 @@ import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutionException; import de.mas.wiiu.jnus.entities.content.Content; -import de.mas.wiiu.jnus.implementations.NUSDataProvider; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.DataProviderUtils; import de.mas.wiiu.jnus.utils.FileUtils; import de.mas.wiiu.jnus.utils.Parallelizable; diff --git a/src/de/mas/wiiu/jnus/NUSTitle.java b/src/de/mas/wiiu/jnus/NUSTitle.java index 27ca529..224b339 100644 --- a/src/de/mas/wiiu/jnus/NUSTitle.java +++ b/src/de/mas/wiiu/jnus/NUSTitle.java @@ -35,7 +35,8 @@ import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.entities.content.ContentFSTInfo; import de.mas.wiiu.jnus.entities.fst.FST; import de.mas.wiiu.jnus.entities.fst.FSTEntry; -import de.mas.wiiu.jnus.implementations.NUSDataProvider; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; +import de.mas.wiiu.jnus.utils.FSTUtils; import lombok.Getter; import lombok.Setter; import lombok.val; diff --git a/src/de/mas/wiiu/jnus/NUSTitleLoader.java b/src/de/mas/wiiu/jnus/NUSTitleLoader.java index d858111..778bec5 100644 --- a/src/de/mas/wiiu/jnus/NUSTitleLoader.java +++ b/src/de/mas/wiiu/jnus/NUSTitleLoader.java @@ -28,7 +28,7 @@ import de.mas.wiiu.jnus.entities.TMD; import de.mas.wiiu.jnus.entities.Ticket; import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.entities.fst.FST; -import de.mas.wiiu.jnus.implementations.NUSDataProvider; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.StreamUtils; import de.mas.wiiu.jnus.utils.Utils; import de.mas.wiiu.jnus.utils.cryptography.AESDecryption; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java index 5ab75ad..63bf129 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocal.java @@ -27,6 +27,7 @@ import java.util.Optional; import de.mas.wiiu.jnus.NUSTitle; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.FileUtils; import de.mas.wiiu.jnus.utils.StreamUtils; import lombok.Getter; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java index 85a36ce..8fc88e1 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderLocalBackup.java @@ -10,6 +10,7 @@ import java.util.Optional; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.StreamUtils; import lombok.Getter; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderRemote.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderRemote.java index d76c62a..011d5c4 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderRemote.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderRemote.java @@ -22,6 +22,7 @@ import java.util.Optional; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import de.mas.wiiu.jnus.utils.Parallelizable; import de.mas.wiiu.jnus.utils.download.NUSDownloadService; import lombok.Getter; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java index 7e453be..22d14e5 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWUD.java @@ -24,6 +24,7 @@ import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.implementations.wud.parser.WUDGamePartition; import de.mas.wiiu.jnus.implementations.wud.parser.WUDPartitionHeader; import de.mas.wiiu.jnus.implementations.wud.reader.WUDDiscReader; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import lombok.Getter; import lombok.extern.java.Log; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java index 5a9b3a4..68dc122 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java +++ b/src/de/mas/wiiu/jnus/implementations/NUSDataProviderWoomy.java @@ -28,6 +28,7 @@ import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; import de.mas.wiiu.jnus.implementations.woomy.WoomyInfo; import de.mas.wiiu.jnus.implementations.woomy.WoomyZipFile; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import lombok.AccessLevel; import lombok.Getter; import lombok.NonNull; diff --git a/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDInfoParser.java b/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDInfoParser.java index 2132d65..de77339 100644 --- a/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDInfoParser.java +++ b/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDInfoParser.java @@ -28,13 +28,13 @@ import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; -import de.mas.wiiu.jnus.FSTUtils; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.ContentFSTInfo; import de.mas.wiiu.jnus.entities.fst.FST; import de.mas.wiiu.jnus.entities.fst.FSTEntry; import de.mas.wiiu.jnus.implementations.wud.reader.WUDDiscReader; import de.mas.wiiu.jnus.utils.ByteUtils; +import de.mas.wiiu.jnus.utils.FSTUtils; import de.mas.wiiu.jnus.utils.Utils; import lombok.val; import lombok.extern.java.Log; diff --git a/src/de/mas/wiiu/jnus/InputStreamWithException.java b/src/de/mas/wiiu/jnus/interfaces/InputStreamWithException.java similarity index 96% rename from src/de/mas/wiiu/jnus/InputStreamWithException.java rename to src/de/mas/wiiu/jnus/interfaces/InputStreamWithException.java index f344fe7..c75e25b 100644 --- a/src/de/mas/wiiu/jnus/InputStreamWithException.java +++ b/src/de/mas/wiiu/jnus/interfaces/InputStreamWithException.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ -package de.mas.wiiu.jnus; +package de.mas.wiiu.jnus.interfaces; import java.io.Closeable; diff --git a/src/de/mas/wiiu/jnus/implementations/NUSDataProvider.java b/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java similarity index 97% rename from src/de/mas/wiiu/jnus/implementations/NUSDataProvider.java rename to src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java index f5769e9..52fe248 100644 --- a/src/de/mas/wiiu/jnus/implementations/NUSDataProvider.java +++ b/src/de/mas/wiiu/jnus/interfaces/NUSDataProvider.java @@ -16,7 +16,7 @@ ****************************************************************************/ -package de.mas.wiiu.jnus.implementations; +package de.mas.wiiu.jnus.interfaces; import java.io.IOException; import java.io.InputStream; diff --git a/src/de/mas/wiiu/jnus/utils/DataProviderUtils.java b/src/de/mas/wiiu/jnus/utils/DataProviderUtils.java index 7a9c99a..174d22e 100644 --- a/src/de/mas/wiiu/jnus/utils/DataProviderUtils.java +++ b/src/de/mas/wiiu/jnus/utils/DataProviderUtils.java @@ -24,7 +24,7 @@ import java.util.Optional; import de.mas.wiiu.jnus.Settings; import de.mas.wiiu.jnus.entities.content.Content; -import de.mas.wiiu.jnus.implementations.NUSDataProvider; +import de.mas.wiiu.jnus.interfaces.NUSDataProvider; import lombok.NonNull; import lombok.extern.java.Log; diff --git a/src/de/mas/wiiu/jnus/FSTUtils.java b/src/de/mas/wiiu/jnus/utils/FSTUtils.java similarity index 96% rename from src/de/mas/wiiu/jnus/FSTUtils.java rename to src/de/mas/wiiu/jnus/utils/FSTUtils.java index 6270181..9923170 100644 --- a/src/de/mas/wiiu/jnus/FSTUtils.java +++ b/src/de/mas/wiiu/jnus/utils/FSTUtils.java @@ -1,7 +1,6 @@ -package de.mas.wiiu.jnus; +package de.mas.wiiu.jnus.utils; import java.io.File; -import java.io.FileNotFoundException; import java.util.List; import java.util.Optional; import java.util.regex.Pattern; @@ -9,7 +8,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.io.FilenameUtils; -import org.apache.commons.io.filefilter.RegexFileFilter; import de.mas.wiiu.jnus.entities.fst.FSTEntry; import lombok.val; diff --git a/src/de/mas/wiiu/jnus/PipedInputStreamWithException.java b/src/de/mas/wiiu/jnus/utils/PipedInputStreamWithException.java similarity index 96% rename from src/de/mas/wiiu/jnus/PipedInputStreamWithException.java rename to src/de/mas/wiiu/jnus/utils/PipedInputStreamWithException.java index d4a7d12..bddca66 100644 --- a/src/de/mas/wiiu/jnus/PipedInputStreamWithException.java +++ b/src/de/mas/wiiu/jnus/utils/PipedInputStreamWithException.java @@ -14,12 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ -package de.mas.wiiu.jnus; +package de.mas.wiiu.jnus.utils; import java.io.IOException; import java.io.PipedInputStream; -import de.mas.wiiu.jnus.utils.Utils; +import de.mas.wiiu.jnus.interfaces.InputStreamWithException; import lombok.extern.java.Log; @Log