public static int byteToShort(byte[] bytes) {
     
            int newValue = 0;
            newValue |= (((int)bytes[0])<<8)&0xFF00;
            newValue |= (((int)bytes[1]))&0xFF;

            return newValue;
}

Posted by 짱가쟁이