Here you can find the source of bytes2ToInt(byte[] inputValues)
private static int bytes2ToInt(byte[] inputValues)
//package com.java2s; //License from project: Apache License public class Main { public static final int BYTE_MASK = 0xff; private static int bytes2ToInt(byte[] inputValues) { return ((inputValues[0] & BYTE_MASK) << 8) | (inputValues[1] & BYTE_MASK); }// w w w. j a va 2 s. co m }