Try the Integer.toHexString method instead.