From 135e78feda21ed96a20300682262c6ef23cf27bf Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 20 Dec 2020 11:24:23 +0100 Subject: [PATCH] Add the method"downloadContentToByteArray" to the NUSDownloadService --- .../de/mas/wiiu/jnus/utils/download/NUSDownloadService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java b/src/main/java/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java index 6c55406..c5a33fd 100644 --- a/src/main/java/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java +++ b/src/main/java/de/mas/wiiu/jnus/utils/download/NUSDownloadService.java @@ -64,6 +64,11 @@ public final class NUSDownloadService extends Downloader { String URL = URL_BASE + "/" + String.format("%016X", titleID) + "/tmd" + version_suf; return downloadFileToByteArray(URL); } + + public byte[] downloadContentToByteArray(long titleID, int contentId) throws IOException { + String URL = URL_BASE + "/" + String.format("%016X/%08X", titleID, contentId); + return downloadFileToByteArray(URL); + } /** * For the cert we need a part from a ticket. For this we simply load a public ticket and use it.