Java Number Swap swapByte(byte b)

Here you can find the source of swapByte(byte b)

Description

swap Byte

License

Open Source License

Declaration

static public int swapByte(byte b) 

Method Source Code

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

public class Main {
    static public int swapByte(byte b) {
        int high = (0x0000000F & ((int) b));
        high = high << 4;//from  w  ww .j  ava2s.c  om
        int low = (int) b >> 4;
        return high + low;
    }
}

Related

  1. swap16(short rgb)
  2. swap32(int rgb)
  3. swapAddresses(T o1, T o2)
  4. swapBits(byte in)
  5. swapBits(int b, int i, int j)
  6. swapBytes(final int i)
  7. swapCasing(String str)
  8. swapDouble(double value)
  9. swapDouble(double value)