Debugger function moved to separated class, other small fixes

This commit is contained in:
honfika@gmail.com
2015-03-09 23:18:02 +01:00
parent d1c6c51c88
commit c98facb399
8 changed files with 224 additions and 197 deletions

View File

@@ -325,6 +325,14 @@ public class Helper {
return ret;
}
public static String byteArrayToHex(byte[] a) {
StringBuilder sb = new StringBuilder(a.length * 2);
for (byte b : a) {
sb.append(String.format("%02x", b & 0xff));
}
return sb.toString();
}
public static String bytesToHexString(byte[] bytes) {
return bytesToHexString(bytes, 0);
}