How to restore hexadecimal string to hexadecimal code in java

  1. there is a requirement to process the hexadecimal code returned by the hardware as a program and convert the hexadecimal code into a string

for example,: FA FB 2F 00 00 00 01 20 05 01 00 11 01 25 3F 00 00 38 00 00 00 02 12 00 00 00 03 00 00 00 02 01 50 02 50 08 25 00 00 00 02 07 10 02 63 19 00 00 00 72 4B

  1. the problem encountered when transferring the hexadecimal string back to the hexadecimal code is as follows:

clipboard.png

Debug tool receiving is inconsistent with sending

ask how to convert the hexadecimal string back to hexadecimal code.

Jun.02,2021

like this?

"FA FB 2F 00 00 00 00 00 01 20 05 01 00 11 01 25 3F 00 00 38 00 00 00 02 12 21 00 00 00 00 00 03 00 00 00 00 00 00 00 02 01 07 50 02 50 08 25 00 00 00 00 00 02 07 10 02 63 19 26 00 00 00 00 00 00 72 4B"
.split(/ /g)
.map(c=>String.fromCharCode(parseInt("0x"+c)))
.map(c=>("0"+c.charCodeAt(0).toString(16).toUpperCase()).slice(-2))
.join(" ")

is java, ignore this answer.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e9df-2c41f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e9df-2c41f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?