Here you can find the source of sumByteArrayToLong(byte[] byteArray)
private static long sumByteArrayToLong(byte[] byteArray)
//package com.java2s; //License from project: LGPL public class Main { private static long sumByteArrayToLong(byte[] byteArray) { long sum = 0L; for (byte aByteArray : byteArray) { sum += (int) aByteArray; }//from www . j av a 2 s.com return sum; } }