Here you can find the source of hashCode(byte a[], int offset, int length)
private static int hashCode(byte a[], int offset, int length)
//package com.java2s; public class Main { private static int hashCode(byte a[], int offset, int length) { if (a == null) return 0; int result = 1; for (int i = offset; i < offset + length; i++) { result = 31 * result + a[i]; }// w w w . j a v a 2 s . c o m return result; } }