Java Array Sum sumByteArrayToLong(byte[] byteArray)

Here you can find the source of sumByteArrayToLong(byte[] byteArray)

Description

sum Byte Array To Long

License

LGPL

Declaration

private static long sumByteArrayToLong(byte[] byteArray) 

Method Source Code

//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;
    }
}

Related

  1. sumArray(int[] array)
  2. sumArray(short[] array)
  3. sumArrays(double[] xs1, double[] xs2)
  4. sumaTotal(int vector[])
  5. sumByte(byte[] array)
  6. sumCoefficients(float[] array)
  7. sumdiff(double[] x)
  8. sumDigits(final long value, final int... digits)
  9. sumDoubleArray(double[] double_array)