mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 14:44:48 -04:00
DarkMatterCore/nxdumptool support
Hotfix within adding DarkMatterCore/nxdumptool support: fix 'Stop' button functionality Update NxdtUsbAbi1.java Rename method isInvalidCommand() -> isInvalidCommand() A bit more renames and debug things More refactoring Typos fixes He just told me that 'NXDT_COMMAND_HEADER_SIZE was added to reflect the UsbCommandHeader struct from my codebase. No received command should ever be smaller than this. NXDT_COMMAND_SIZE was renamed to NXDT_MAX_COMMAND_SIZE for this reason.' Some bug fixes With debug Few more fixes Copy-paste Windows10 workaround fix Add NXDT_FILE_PROPERTIES_MAX_NAME_LENGTH validation Fix NXDT_FILE_PROPERTIES_MAX_NAME_LENGTH validation If fileSize == 0 only one success reply sent Add debug rewrite timeouts One more rewrite timeouts
This commit is contained in:
parent
63341008a5
commit
77ae860396
18 changed files with 726 additions and 143 deletions
|
@ -41,12 +41,23 @@ public class RainbowHexDump {
|
|||
System.out.println(">"+ANSI_RED+byteArray.length+ANSI_RESET);
|
||||
for (byte b: byteArray)
|
||||
System.out.print(String.format("%02x ", b));
|
||||
//System.out.println();
|
||||
System.out.println();
|
||||
System.out.print("\t\t\t"
|
||||
+ new String(byteArray, StandardCharsets.UTF_8)
|
||||
+ "\n");
|
||||
}
|
||||
|
||||
public static void hexDumpUTF8ForWin(byte[] byteArray){
|
||||
for (int i=0; i < byteArray.length; i++)
|
||||
System.out.print(String.format("%02d-", i%100));
|
||||
System.out.println(">"+byteArray.length);
|
||||
for (byte b: byteArray)
|
||||
System.out.print(String.format("%02x ", b));
|
||||
System.out.println();
|
||||
System.out.print(new String(byteArray, StandardCharsets.UTF_8)
|
||||
+ "\n");
|
||||
}
|
||||
|
||||
public static void hexDumpUTF16LE(byte[] byteArray){
|
||||
System.out.print(ANSI_BLUE);
|
||||
for (int i=0; i < byteArray.length; i++)
|
||||
|
@ -54,8 +65,7 @@ public class RainbowHexDump {
|
|||
System.out.println(">"+ANSI_RED+byteArray.length+ANSI_RESET);
|
||||
for (byte b: byteArray)
|
||||
System.out.print(String.format("%02x ", b));
|
||||
System.out.print("\t\t\t"
|
||||
+ new String(byteArray, StandardCharsets.UTF_16LE)
|
||||
System.out.print(new String(byteArray, StandardCharsets.UTF_16LE)
|
||||
+ "\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue