Here you can find the source of checkSum(byte[] bytes)
public static byte checkSum(byte[] bytes)
//package com.java2s; public class Main { public static byte checkSum(byte[] bytes) { byte sum = 0; for (byte b : bytes) { sum ^= b;//w w w. j a v a2s . c o m } return sum; } }