mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-22 07:59:19 +01:00
Formatting and organizing imports
This commit is contained in:
parent
b6a5946f9e
commit
44b04ea637
@ -27,8 +27,6 @@ import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import de.mas.wiiu.jnus.entities.TMD;
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
import de.mas.wiiu.jnus.entities.content.Content;
|
||||
@ -39,7 +37,6 @@ import de.mas.wiiu.jnus.interfaces.NUSDataProvider;
|
||||
import de.mas.wiiu.jnus.utils.FSTUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.val;
|
||||
|
||||
public class NUSTitle {
|
||||
@Getter @Setter private FST FST;
|
||||
|
@ -19,7 +19,6 @@ package de.mas.wiiu.jnus;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.ParseException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
@ -30,7 +29,6 @@ import de.mas.wiiu.jnus.entities.content.Content;
|
||||
import de.mas.wiiu.jnus.entities.fst.FST;
|
||||
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;
|
||||
|
||||
public class NUSTitleLoader {
|
||||
|
@ -24,7 +24,6 @@ import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
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;
|
||||
|
@ -54,7 +54,7 @@ public class NUSDataProviderLocalBackup implements NUSDataProvider {
|
||||
public Optional<byte[]> getRawTMD() throws IOException {
|
||||
String inputPath = getLocalPath();
|
||||
String tmdPath = inputPath + File.separator + Settings.TMD_FILENAME;
|
||||
if (titleVersion != Settings.LATEST_TMD_VERSION) {
|
||||
if (titleVersion != Settings.LATEST_TMD_VERSION) {
|
||||
tmdPath = inputPath + File.separator + "v" + titleVersion + File.separator + Settings.TMD_FILENAME;
|
||||
}
|
||||
File tmdFile = new File(tmdPath);
|
||||
|
@ -23,7 +23,6 @@ import java.util.Optional;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipException;
|
||||
|
||||
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.implementations.woomy.WoomyInfo;
|
||||
|
@ -15,7 +15,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
package de.mas.wiiu.jnus.interfaces;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -31,6 +31,5 @@ public class CheckSumWrongException extends Exception {
|
||||
super(string);
|
||||
this.givenHash = given;
|
||||
this.expectedHash = expected;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ public abstract class Downloader {
|
||||
ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
|
||||
|
||||
if (responseCode == HttpURLConnection.HTTP_OK) {
|
||||
|
||||
InputStream inputStream = httpConn.getInputStream();
|
||||
|
||||
int bytesRead = -1;
|
||||
|
@ -88,7 +88,7 @@ public final class NUSDownloadService extends Downloader {
|
||||
HttpURLConnection connection = (HttpURLConnection) url_obj.openConnection();
|
||||
connection.setRequestProperty("User-Agent", Settings.USER_AGENT);
|
||||
String sizeString = "";
|
||||
if(size.isPresent()) {
|
||||
if (size.isPresent()) {
|
||||
sizeString = Long.toString(size.get());
|
||||
}
|
||||
connection.setRequestProperty("Range", "bytes=" + offset + "-" + sizeString);
|
||||
|
Loading…
Reference in New Issue
Block a user