update 电单车协议

This commit is contained in:
Guoqs
2024-09-05 09:58:21 +08:00
parent 2a6daa56df
commit b341862071
9 changed files with 107 additions and 21 deletions

View File

@@ -10,6 +10,8 @@ import java.math.BigDecimal;
* @author jsowell
*/
public class Constants {
// 电单车协议包头
public static final String EBIKE_HEADER = "DNY";
// 十六进制前缀
public static final String HEX_PREFIX = "0x";

View File

@@ -380,7 +380,7 @@ public class BytesUtil {
// int i = BytesUtil.bytesToIntLittle(length);
// System.out.println(i);
String testStr = "DNY";
String testStr = Constants.EBIKE_HEADER;
byte[] hexBytes = stringToHexBytes(testStr, 3);
System.out.println("Hex Bytes: " + bytesToHex(hexBytes));
}