Here you can find the source of toInteger(byte[] input, int offset)
private static int toInteger(byte[] input, int offset)
//package com.java2s; /**/*from w w w. ja v a2s . c o m*/ * Source obtained from crypto-gwt. Apache 2 License. * https://code.google.com/p/crypto-gwt/source/browse/crypto-gwt/src/main/java/com/googlecode/ * cryptogwt/util/ByteArrayUtils.java */ public class Main { public static int toInteger(byte[] input) { return toInteger(input, 0); } private static int toInteger(byte[] input, int offset) { assert offset + 4 <= input.length : "Invalid length " + input.length; return ((input[offset++] & 0xff) << 24) | ((input[offset++] & 0xff) << 16) | ((input[offset++] & 0xff) << 8) | ((input[offset++] & 0xff)); } }