I a obtenu un nombre entier: 1695609641
Java entier à tableau d'octets
lorsque j'utilise la méthode:
String hex = Integer.toHexString(1695609641);
system.out.println(hex);
donne:
6510f329
mais je veux un tableau d'octets:
byte[] bytearray = new byte[] { (byte) 0x65, (byte)0x10, (byte)0xf3, (byte)0x29};
Comment puis-je faire cela?
double possible [Convertir entier en tableau d'octets (Java)] (http://stackoverflow.com/questions/1936857/convert-integer-into-byte-array-java) – finnw