我得到一个整数: 1695609641
当我使用方法时:
String hex = Integer.toHexString(1695609641);
system.out.println(hex);
Run Code Online (Sandbox Code Playgroud)
得到:
6510f329
Run Code Online (Sandbox Code Playgroud)
但我想要一个字节数组:
byte[] bytearray = new byte[] { (byte) 0x65, (byte)0x10, (byte)0xf3, (byte)0x29};
Run Code Online (Sandbox Code Playgroud)
我该怎么做?