Here you can find the source of Convert2bytesHexaFormatToInt(byte[] ArrayToConvert)
public static int Convert2bytesHexaFormatToInt(byte[] ArrayToConvert)
//package com.java2s; //License from project: Open Source License public class Main { public static int Convert2bytesHexaFormatToInt(byte[] ArrayToConvert) { int ConvertedNumber = 0; if (ArrayToConvert[1] <= -1)//<0 ConvertedNumber += ArrayToConvert[1] + 256; else// ww w . j a v a2 s. com ConvertedNumber += ArrayToConvert[1]; if (ArrayToConvert[0] <= -1)//<0 ConvertedNumber += (ArrayToConvert[0] * 256) + 256; else ConvertedNumber += ArrayToConvert[0] * 256; return ConvertedNumber; } }