Here you can find the source of arraysEquals(byte[] a, int ofsA, byte[] b, int ofsB, int len)
public static boolean arraysEquals(byte[] a, int ofsA, byte[] b, int ofsB, int len)
//package com.java2s; //License from project: Apache License public class Main { public static boolean arraysEquals(byte[] a, int ofsA, byte[] b, int ofsB, int len) { int end = ofsA + len; while (ofsA < end) { if (b[ofsB++] != a[ofsA++]) { return false; }/*from www. ja v a 2 s. co m*/ } return true; } }