Here you can find the source of bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen)
public static boolean bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen)
//package com.java2s; public class Main { public static boolean bytesEqual(byte[] a, int aFrom, int aLen, byte[] b, int bFrom, int bLen) { if (aLen != bLen) { return false; }/* w w w . j ava 2 s .co m*/ for (int i = 0; i < aLen; i++) { if (a[aFrom + i] != b[bFrom + i]) { return false; } } return true; } }