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

 

posted @ 2024-01-22 11:55  都是城市惹的祸  阅读(245)  评论(0)    收藏  举报