Here you can find the source of isEqual(byte[] first, byte[] second)
public static boolean isEqual(byte[] first, byte[] second)
//package com.java2s; //License from project: LGPL public class Main { public static boolean isEqual(byte[] first, byte[] second) { boolean out = first != null && second != null && first.length == second.length; for (int i = 0; out && i < first.length; i++) { if (first[i] != second[i]) { out = false;//from ww w .j a v a 2s. com } } return out; } }