Java整数到字节数组
我得到一个整数: 1695609641
1695609641
当我使用方法时:
String hex = Integer.toHexString(1695609641);system.out.println(hex);
得到:
6510f329
但我想要一个字节数组:
byte[] bytearray = new byte[] { (byte) 0x65, (byte)0x10, (byte)0xf3, (byte)0x29};
我该怎么做?
神不在的星期二
拉丁的传说
相关分类