Here you can find the source of formatInteger(byte[] btValue, int iOffset, int iLength)
public static String formatInteger(byte[] btValue, int iOffset, int iLength)
//package com.java2s; //License from project: Apache License public class Main { public static String formatInteger(byte[] btValue, int iOffset, int iLength) { int iLastOffset = iOffset + iLength; if (btValue.length < iLastOffset || iLength < 1) return ""; int iValue = 0; for (int iIndex = iOffset; iIndex < iLastOffset; iIndex++) { iValue <<= 8;// ww w . jav a 2 s .com iValue |= (btValue[iIndex] & 0xFF); } return String.valueOf(iValue); } }