Here you can find the source of flip32(long num)
Parameter | Description |
---|---|
num | a parameter |
public static long flip32(long num)
//package com.java2s; public class Main { /**/*from w w w. ja v a2s.c o m*/ * for switching big/small endian * @param num * @return flipped representation. */ public static long flip32(long num) { long tmp = num; tmp = ((tmp & 0x000000FF) << 24) + ((tmp & 0x0000FF00) << 8) + ((tmp & 0x00FF0000) >> 8) + ((tmp & 0xFF000000) >> 24); return tmp; } }