Here you can find the source of BytesBEToInt(final byte[] buf)
public final static int BytesBEToInt(final byte[] buf)
//package com.java2s; //License from project: Creative Commons License public class Main { public final static int BytesBEToInt(final byte[] buf) { int val = 0x0; for (int i = 0; i < buf.length; i++) { val += ((int) buf[i] & 0xFF) << ((3 - i) * 8); }/*from w ww.j a v a 2s . com*/ return val; } }