当前位置 : 首页 » 文章分类 :  开发  »  Apache-Commons-Codec 笔记

Apache-Commons-Codec 笔记

Apache-Commons-Codec 笔记
http://commons.apache.org/proper/commons-codec/

Hex 十六进制

Java十六进制字符串转byte数组

@Test
public void hexoToByteArray() throws Exception {
    byte[] bytes = Hex.decodeHex("4E6AE63D".toCharArray());
    System.out.println("base64:");
    System.out.println(Base64Utils.encodeToString(bytes));
}

Convert a string representation of a hex dump to a byte array using Java?
https://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java

下一篇 Expect脚本

阅读
评论
83
阅读预计1分钟
创建日期 2020-10-09
修改日期 2020-10-09
类别

页面信息

location:
protocol:
host:
hostname:
origin:
pathname:
href:
document:
referrer:
navigator:
platform:
userAgent:

评论