Here you can find the source of areEqualBytes(byte[] b1, byte[] b2)
private static boolean areEqualBytes(byte[] b1, byte[] b2)
//package com.java2s; //License from project: Apache License public class Main { private static boolean areEqualBytes(byte[] b1, byte[] b2) { if (b1.length != b2.length) { return false; }// w ww.j ava 2s . c om for (int i = 0; i < b1.length; i++) { if (b1[i] != b2[i]) { return false; } } return true; } }