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)*2),16).intValue();
}
System.out.printf("获取的值:"+new String(bytes));
posted @ 2020-12-18 20:26  磊~哥  阅读(469)  评论(0编辑  收藏  举报