Initial commit
This commit is contained in:
20
sources/com/ubtrobot/jimu/bluetooth/utils/ByteHexHelper.java
Normal file
20
sources/com/ubtrobot/jimu/bluetooth/utils/ByteHexHelper.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.ubtrobot.jimu.bluetooth.utils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ByteHexHelper {
|
||||
public static String a(byte[] bArr) {
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
if (bArr == null || bArr.length <= 0) {
|
||||
return "";
|
||||
}
|
||||
for (byte b : bArr) {
|
||||
String hexString = Integer.toHexString(b & 255);
|
||||
if (hexString.length() < 2) {
|
||||
sb.append(0);
|
||||
}
|
||||
sb.append(hexString);
|
||||
sb.append(" ");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user