Java Number Swap swap16(short rgb)

Here you can find the source of swap16(short rgb)

Description

swap

License

Open Source License

Declaration

public static short swap16(short rgb) 

Method Source Code

//package com.java2s;

public class Main {
    public static short swap16(short rgb) {
        int a = (rgb >> 8) & 0xFF;
        int r = rgb & 0xff;

        return (short) ((r << 8) | a);
    }/*  w ww.  java2 s .  c  o  m*/
}

Related

  1. swap(String str, int i, int j)
  2. swap(StringBuffer s, int i, int j)
  3. swap(T a, T b)
  4. swap(T... args)
  5. swap16(final int aValue)
  6. swap32(int rgb)
  7. swapAddresses(T o1, T o2)
  8. swapBits(byte in)
  9. swapBits(int b, int i, int j)