Here you can find the source of sumByte(byte[] array)
public static final int sumByte(byte[] array)
//package com.java2s; /**// w w w . ja v a 2 s . c o m * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * @author Jay Codec * */ public class Main { public static final int sumByte(byte[] array) { int result = 0; for (int i = 0; i < array.length; i++) { result += array[i]; } return result; } }