Here you can find the source of equals(byte[] left, byte[] right)
public static boolean equals(byte[] left, byte[] right)
//package com.java2s; public class Main { public static boolean equals(byte[] left, byte[] right) { if (left == null) { return right == null; }/* ww w . j a v a2 s.c o m*/ if (right == null) { return false; } if (left.length != right.length) { return false; } boolean result = true; for (int i = left.length - 1; i >= 0; i--) { result &= left[i] == right[i]; } return result; } }