Here you can find the source of arraysEqual(byte array1[], byte array2[])
public static boolean arraysEqual(byte array1[], byte array2[])
//package com.java2s; //License from project: LGPL public class Main { public static boolean arraysEqual(byte array1[], byte array2[]) { if (array1.length != array2.length) { return false; }/*ww w. jav a 2s . co m*/ for (int i = 0; i < array1.length; ++i) { if (array1[i] != array2[i]) { return false; } } return true; } }