Here you can find the source of buildInt(byte first, byte second)
public static int buildInt(byte first, byte second)
//package com.java2s; public class Main { public static int buildInt(byte first, byte second) { return (byte) ((second << 8) & 0xFF) + (first & 0xFF); }//from ww w. j av a 2 s. co m }