Java Endian Swap swapEndianness(int i)

Here you can find the source of swapEndianness(int i)

Description

swap Endianness

License

Open Source License

Declaration

public static int swapEndianness(int i) 

Method Source Code

//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
}

Related

  1. swapEndian(final int i)
  2. swapEndian2Bytes(short sEndian)
  3. swapEndianHexString(String in)