Here you can find the source of toIntBE(byte[] src, int offset)
public static final int toIntBE(byte[] src, int offset)
//package com.java2s; /******************************************************************************* * Copyright (c) 2013 Jens Kristian Villadsen. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html//from ww w . ja v a 2 s .com * * Contributors: * Jens Kristian Villadsen - Lead developer, owner and creator ******************************************************************************/ public class Main { /** * 32bit to int */ public static final int toIntBE(byte[] src, int offset) { return (((src[offset] & 0xFF) << 24) + ((src[++offset] & 0xFF) << 16) + ((src[++offset] & 0xFF) << 8) + (src[++offset] & 0xFF)); } }