Here you can find the source of bytesToHexChecksum(byte[] byteArr)
public static String bytesToHexChecksum(byte[] byteArr)
//package com.java2s; /*/*from w ww. jav a 2 s. c o m*/ * Copyright (C) 2010-2012, Wan Lee, wan5332@gmail.com * Source can be obtained from git://github.com/wanclee/datashaper.git * BSD-style license. Please read license.txt that comes with source files */ public class Main { public static String bytesToHexChecksum(byte[] byteArr) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < byteArr.length; i++) { buf.append(Integer.toHexString(0xFF & byteArr[i]).toUpperCase()); } return buf.toString(); } }