gpt4 book ai didi

java - 如何将 BBM bin 转换为 DeviceId

转载 作者:行者123 更新时间:2023-12-02 07:51:09 25 4
gpt4 key购买 nike

我使用此行将 bin 从成员转换为数字和字符

String bin=Integer.toString(Integer.parseInt(DeviceInfo.getDeviceId(),16))

现在如何将 bin 再次转换为 DeviceId(仅限数字)

最佳答案

我想你想要相反的:

String rev=Integer.toHexString(Integer.parseInt(bin));

例如,这段代码:

String bin=Integer.toString(Integer.parseInt("12345678",16));
String rev=Integer.toHexString(Integer.parseInt(bin));
System.out.println(bin);
System.out.println(rev);

输出:

305419896
12345678

关于java - 如何将 BBM bin 转换为 DeviceId,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10214316/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com