Android Bit Set reverseBits(byte[] bits)

Here you can find the source of reverseBits(byte[] bits)

Description

reverse Bits

Declaration

private static void reverseBits(byte[] bits) 

Method Source Code

//package com.java2s;

public class Main {
    private static void reverseBits(byte[] bits) {
        for (int i = 0; i < 4; i++) {
            byte temp = bits[i];
            bits[i] = bits[bits.length - i - 1];
            bits[bits.length - i - 1] = temp;
        }// w  w  w  .j  a  v a2 s  . c om
    }
}

Related

  1. setBit(byte bite, int offset, boolean set)
  2. setBit(byte bits, int offset, boolean status)
  3. resetBit(byte b, int bit)
  4. setBit(byte[] arr, int bit)
  5. setBit(byte[] bytes, int bitNr, int bit)
  6. bitwiseNot(int number)
  7. xor(byte[]... arrays)
  8. xorArray(byte[] array, byte[] mask)