Android Byte Array Reverse getReverseBytesLong(byte[] bb, int index)

Here you can find the source of getReverseBytesLong(byte[] bb, int index)

Description

get Reverse Bytes Long

Declaration

public static long getReverseBytesLong(byte[] bb, int index) 

Method Source Code

//package com.java2s;

public class Main {
    public static long getReverseBytesLong(byte[] bb, int index) {

        return ((((long) bb[index + 7] & 0xff) << 56)
                | (((long) bb[index + 6] & 0xff) << 48)
                | (((long) bb[index + 5] & 0xff) << 40)
                | (((long) bb[index + 4] & 0xff) << 32)
                | (((long) bb[index + 3] & 0xff) << 24)
                | (((long) bb[index + 2] & 0xff) << 16)
                | (((long) bb[index + 1] & 0xff) << 8) | (((long) bb[index + 0] & 0xff) << 0));

    }/*from w  ww .  ja v  a  2 s. c  o  m*/
}

Related

  1. reverseWord(byte[] b)
  2. reverseWordLatin(byte[] b)
  3. reverse(byte[] byteArray)
  4. reverseBytes(byte[] bytes)
  5. getReverseBytesInt(byte[] bb, int index)
  6. getReverseBytesShort(byte[] b, int index)
  7. invertedByteArray(byte[] byteArr)