String hexStr = "3439393930";
byte[] bytes = new byte[5];
for (int i = 0;i < 5; i++) {
bytes[i] = (byte) Integer.valueOf(hexStr.substring(i*2,(i+1)*2),16).intValue();
}
System.out.printf("获取的值:"+new String(bytes));java 如何对于c语言memcpy函数的数据解析(硬件对接)
摘要: String hexStr = "3439393930";byte[] bytes = new byte[5];for (int i = 0;i < 5; i++) { bytes[i] = (byte) Integer.valueOf(hexStr.substring(i*2,(i+1
103 阅读
← 返回技术栈