Here you can find the source of arraysEqual(byte[] bytes, byte[] ints)
public static boolean arraysEqual(byte[] bytes, byte[] ints)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static boolean arraysEqual(byte[] bytes, byte[] ints) { if (bytes == null || ints == null) { return false; }//from w w w . j a v a 2 s . c om if (bytes.length != ints.length) { return false; } for (int i = 0; i < bytes.length; i++) { if (bytes[i] != ints[i]) { return false; } } return true; } }