Here you can find the source of toInt(byte[] key)
public static int toInt(byte[] key)
//package com.java2s; // BSD License (http://lemurproject.org/galago-license) public class Main { public static int toInt(byte[] key) { assert isInt(key); return (((key[0] & 255) << 24) + ((key[1] & 255) << 16) + ((key[2] & 255) << 8) + (key[3] & 255)); }// w w w . j ava 2s. co m public static boolean isInt(byte[] key) { return key != null && key.length == 4; } }