Drop javax.xml.bind:jaxb-api
This commit is contained in:
@@ -30,7 +30,6 @@ dependencies {
|
|||||||
implementation 'net.java.dev.jna:jna-platform:5.12.1'
|
implementation 'net.java.dev.jna:jna-platform:5.12.1'
|
||||||
implementation 'com.github.oshi:oshi-core:6.2.2'
|
implementation 'com.github.oshi:oshi-core:6.2.2'
|
||||||
implementation 'org.simpleframework:simple-xml:2.7.1'
|
implementation 'org.simpleframework:simple-xml:2.7.1'
|
||||||
implementation 'javax.xml.bind:jaxb-api:2.3.1'
|
|
||||||
implementation 'com.formdev:flatlaf:2.2' // 2.3+ causes illegal reflective access warning on win + adoptium java 11.0.16
|
implementation 'com.formdev:flatlaf:2.2' // 2.3+ causes illegal reflective access warning on win + adoptium java 11.0.16
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.10.0'
|
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.10.0'
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
import javax.xml.bind.DatatypeConverter;
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@@ -76,7 +75,7 @@ public class Utils {
|
|||||||
byte[] buffer = new byte[8192];
|
byte[] buffer = new byte[8192];
|
||||||
while (dis.read(buffer) > 0)
|
while (dis.read(buffer) > 0)
|
||||||
; // process the entire file
|
; // process the entire file
|
||||||
String data = DatatypeConverter.printHexBinary(md.digest()).toLowerCase();
|
String data = convertBinaryToHex(md.digest());
|
||||||
dis.close();
|
dis.close();
|
||||||
is.close();
|
is.close();
|
||||||
return data;
|
return data;
|
||||||
@@ -86,6 +85,17 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String convertBinaryToHex(byte[] bytes) {
|
||||||
|
StringBuilder hexStringBuilder = new StringBuilder();
|
||||||
|
for (byte aByte : bytes) {
|
||||||
|
char[] hex = new char[2];
|
||||||
|
hex[0] = Character.forDigit((aByte >> 4) & 0xF, 16);
|
||||||
|
hex[1] = Character.forDigit((aByte & 0xF), 16);
|
||||||
|
hexStringBuilder.append(new String(hex));
|
||||||
|
}
|
||||||
|
return hexStringBuilder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public static double lastModificationTime(File directory_) {
|
public static double lastModificationTime(File directory_) {
|
||||||
double max = 0.0;
|
double max = 0.0;
|
||||||
if (directory_.isDirectory()) {
|
if (directory_.isDirectory()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user