Correct Java 8 related things
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ffa9c6903f
commit
c39a5f4c5b
3 changed files with 14 additions and 4 deletions
|
@ -32,6 +32,7 @@ import nsusbloader.Utilities.patches.es.finders.HeuristicEsWizard;
|
||||||
|
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.nio.Buffer;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -118,7 +119,7 @@ public class EsPatch {
|
||||||
handyEsPatch.put(FOOTER);
|
handyEsPatch.put(FOOTER);
|
||||||
|
|
||||||
byte[] esPatch = new byte[handyEsPatch.position()];
|
byte[] esPatch = new byte[handyEsPatch.position()];
|
||||||
handyEsPatch.rewind();
|
((Buffer) handyEsPatch).rewind();
|
||||||
handyEsPatch.get(esPatch);
|
handyEsPatch.get(esPatch);
|
||||||
|
|
||||||
try (BufferedOutputStream stream = new BufferedOutputStream(
|
try (BufferedOutputStream stream = new BufferedOutputStream(
|
||||||
|
|
|
@ -35,6 +35,7 @@ import nsusbloader.Utilities.patches.BinToAsmPrinter;
|
||||||
import nsusbloader.Utilities.patches.fs.finders.HeuristicFsWizard;
|
import nsusbloader.Utilities.patches.fs.finders.HeuristicFsWizard;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.nio.Buffer;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -87,6 +88,13 @@ public class FsPatch {
|
||||||
logPrinter.print(" == Debug information ==\n"+wizard.getDebug(), EMsgType.NULL);
|
logPrinter.print(" == Debug information ==\n"+wizard.getDebug(), EMsgType.NULL);
|
||||||
}
|
}
|
||||||
private KIP1Provider getKIP1Provider() throws Exception{
|
private KIP1Provider getKIP1Provider() throws Exception{
|
||||||
|
System.out.println("ncaProvider "+ncaProvider);
|
||||||
|
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(0));
|
||||||
|
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(1));
|
||||||
|
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(2));
|
||||||
|
System.out.println("CONTENT "+ncaProvider.getNCAContentProvider(3));
|
||||||
|
|
||||||
|
|
||||||
RomFsProvider romFsProvider = ncaProvider.getNCAContentProvider(0).getRomfs();
|
RomFsProvider romFsProvider = ncaProvider.getNCAContentProvider(0).getRomfs();
|
||||||
|
|
||||||
FileSystemEntry package2FsEntry = romFsProvider.getRootEntry().getContent()
|
FileSystemEntry package2FsEntry = romFsProvider.getRootEntry().getContent()
|
||||||
|
@ -175,7 +183,7 @@ public class FsPatch {
|
||||||
handyFsPatch.put(FOOTER);
|
handyFsPatch.put(FOOTER);
|
||||||
|
|
||||||
byte[] fsPatch = new byte[handyFsPatch.position()];
|
byte[] fsPatch = new byte[handyFsPatch.position()];
|
||||||
handyFsPatch.rewind();
|
((Buffer) handyFsPatch).rewind();
|
||||||
handyFsPatch.get(fsPatch);
|
handyFsPatch.get(fsPatch);
|
||||||
|
|
||||||
try (BufferedOutputStream stream = new BufferedOutputStream(
|
try (BufferedOutputStream stream = new BufferedOutputStream(
|
||||||
|
|
|
@ -30,6 +30,7 @@ import nsusbloader.Utilities.patches.SimplyFind;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.nio.Buffer;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
@ -110,7 +111,7 @@ public class LoaderPatch {
|
||||||
|
|
||||||
private void writeFile() throws Exception{
|
private void writeFile() throws Exception{
|
||||||
String patchFileLocation = saveToLocation + File.separator +
|
String patchFileLocation = saveToLocation + File.separator +
|
||||||
"atmosphere" + File.separator + "kip_patches" + File.separator + "fs_patches" + File.separator + patchName;
|
"atmosphere" + File.separator + "kip_patches" + File.separator + "loader_patches" + File.separator + patchName;
|
||||||
|
|
||||||
ByteBuffer handyFsPatch = ByteBuffer.allocate(0x100).order(ByteOrder.LITTLE_ENDIAN);
|
ByteBuffer handyFsPatch = ByteBuffer.allocate(0x100).order(ByteOrder.LITTLE_ENDIAN);
|
||||||
handyFsPatch.put(HEADER);
|
handyFsPatch.put(HEADER);
|
||||||
|
@ -118,7 +119,7 @@ public class LoaderPatch {
|
||||||
handyFsPatch.put(FOOTER);
|
handyFsPatch.put(FOOTER);
|
||||||
|
|
||||||
byte[] fsPatch = new byte[handyFsPatch.position()];
|
byte[] fsPatch = new byte[handyFsPatch.position()];
|
||||||
handyFsPatch.rewind();
|
((Buffer) handyFsPatch).rewind();
|
||||||
handyFsPatch.get(fsPatch);
|
handyFsPatch.get(fsPatch);
|
||||||
|
|
||||||
try (BufferedOutputStream stream = new BufferedOutputStream(
|
try (BufferedOutputStream stream = new BufferedOutputStream(
|
||||||
|
|
Loading…
Reference in a new issue