Swap bytes for 16-bit value
value
static int swap16(int value) { return ((value & 0xFF) << 8) | ((value >> 8) & 0xFF); }