Here you can find the source of swapEndianness(int i)
public static int swapEndianness(int i)
//package com.java2s; public class Main { public static int swapEndianness(int i) { return ((i >>> 24) & 0xFF) | ((i >> 8) & 0xFF00) | ((i << 8) & 0xFF0000) | ((i << 24) & 0xFF000000); }// w w w . jav a 2s .c om }