When dealing with signed int conversion to hex, only Integer.toString(value, 16)
is useful
see a post on subject but I need to format with 4 hex digits (leading zeros for positive numbers and not 32bits/8chars for negatif numbers),
in C++ the right function is IntToHex( value,4)
http://docwiki.embarcadero.com/Libraries/XE3/en/System.SysUtils.IntToHex
But I didn't fiund the equivalent in Java (Android).