Here you can find the source of areEqual(byte[] a, byte[] b)
public static boolean areEqual(byte[] a, byte[] b)
//package com.java2s; public class Main { /**//from www. j a v a 2 s.co m * Compares two byte arrays for equality. * * @return true if the arrays have identical contents */ public static boolean areEqual(byte[] a, byte[] b) { int aLength = a.length; if (aLength != b.length) return false; for (int i = 0; i < aLength; i++) if (a[i] != b[i]) return false; return true; } /** * Compares two int arrays for equality. * * @return true if the arrays have identical contents */ public static boolean areEqual(int[] a, int[] b) { int aLength = a.length; if (aLength != b.length) return false; for (int i = 0; i < aLength; i++) if (a[i] != b[i]) return false; return true; } }