Android Byte Array to Long Convert byteArrayToLong(byte[] bArray)

Here you can find the source of byteArrayToLong(byte[] bArray)

Description

byte Array To Long

Declaration

public static long byteArrayToLong(byte[] bArray) 

Method Source Code

//package com.java2s;

public class Main {
    public static long byteArrayToLong(byte[] bArray) {
        long a = 0;
        for (int i = 0; i < bArray.length; i++) {
            a += (long) ((bArray[i] & 0XFF) << (8 * i));
        }//  ww w  . j  ava 2 s .c o  m
        return a;
    }
}

Related

  1. parseLong(byte[] b, int start, int end, int radix)
  2. parseLong(byte[] b, int start, int end)
  3. bytes2long(byte[] b)
  4. byteArrayToLong(byte[] arr)
  5. byteArrayToLong(byte[] b)
  6. bytesBE2long(byte[] b, int off)
  7. bytesBE2longs(byte[] b)
  8. byteToLong(byte[] b)
  9. bytesLE2long(byte[] b, int off)