Android examples for java.lang:Integer
Convert two element byte array to int
public class Main{ private static int getShort(byte[] data) { return (int) ((data[0] << 8) | data[1] & 0xFF); }/* w w w .j ava 2s .c om*/ }