Here you can find the source of ArrayByteCompare(byte[] a, byte[] b)
public static boolean ArrayByteCompare(byte[] a, byte[] b)
//package com.java2s; //License from project: Apache License public class Main { public static boolean ArrayByteCompare(byte[] a, byte[] b) { boolean ret = true; if (a.length == b.length) { for (int i = 0; i < a.length; i++) { if (a[i] != b[i]) { ret = false;/*from w ww. j a v a 2 s .com*/ break; } } } else { ret = false; } return ret; } }