Android Utililty Methods Byte to Short Convert

List of utility methods to do Byte to Short Convert

Description

The list of methods to do Byte to Short Convert are organized into topic(s).

Method

shortgetShort(byte b1, byte b2)
Gets an short from two bytes
short i1 = (short) (b1 & 0xff);
short i2 = (short) (b2 & 0xff);
short val = (short) (i2 << 8 | i1);
return val;