Hutool byte[]转十六进制字符串
byte[] bytes = new byte[5]; bytes[0] = 0x5B; bytes[1] = 0x05; bytes[2] = 0x15; bytes[3] = 0x25; bytes[4] = 0x5D; s = HexUtil.encodeHexStr(bytes); log.info(s); // 5b0515255d
有些事情,没经历过不知道原理,没失败过不明白奥妙,没痛苦过不了解真谛。临渊羡鱼,不如退而结网!
byte[] bytes = new byte[5]; bytes[0] = 0x5B; bytes[1] = 0x05; bytes[2] = 0x15; bytes[3] = 0x25; bytes[4] = 0x5D; s = HexUtil.encodeHexStr(bytes); log.info(s); // 5b0515255d