swap64 static method
Swap bytes for 64-bit value
value
: The 64-bit value to swap bytes for Returns the value with swapped bytes
Implementation
static int swap64(int value) {
return ((value & 0xFF) << 56) |
((value & 0xFF00) << 40) |
((value & 0xFF0000) << 24) |
((value & 0xFF000000) << 8) |
((value >> 8) & 0xFF000000) |
((value >> 24) & 0xFF0000) |
((value >> 40) & 0xFF00) |
((value >> 56) & 0xFF);
}