Java Number Swap swap(int elementWidth, long value)

Here you can find the source of swap(int elementWidth, long value)

Description

swap

License

Open Source License

Declaration

private static long swap(int elementWidth, long value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static long swap(int elementWidth, long value) {
        return Long.reverseBytes(value) >>> (8 * (8 - elementWidth));
    }// ww  w . jav a  2 s.c om
}

Related

  1. swap(final int value)
  2. swap(Integer i, Integer j)
  3. swap(short myShort)
  4. swap(short value)
  5. swap(short x)