/* converting an int to a hex String, with lead zeroes suppressed. */
String unsignedHex = Integer.toHexString( i );

/* alternatively, still with lead zeroes suppresed. */
String signedHex = Integer.toString( i , 16 /* radix */ );

/* normally you want toHexString because it uses unsigned hex.
   Result is "fffffff4". */
String unsignedHex = Integer.toHexString( -12 );

/*  toString gives a signed result.
    Result is "-c". */
String signedHex = Integer.toString( -12 , 16 /* radix */ );

/* for binary */
String unsignedBinary = Integer.toBinaryString( i );

/* for octal */
String unsignedOctal = Integer.toOctalString( i );