Decimal (signed) to hexadecimal
Integer.toHexString(10进制数 & 0xffff) 这个方式转出来的16进制为 例:FD01
Integer.toHexString(10进制数) 这个方式转出来的16进制为 例:FFFFFD01
Hexadecimal to decimal (signed)
short val = (short)((Integer.parseInt("16进制字符串", 16)) & 0xffff);