Here you can find the source of flip16(int num)
Parameter | Description |
---|---|
num | a parameter |
public static int flip16(int num)
//package com.java2s; public class Main { /**//from w w w .j av a 2 s .c o m * for switching big/small endian * @param num * @return filpped representation. */ public static int flip16(int num) { int tmp = num; tmp = ((tmp & 0x00FF) << 8) + ((tmp & 0xFF00) >> 8); return tmp; } }