Then you'll need to store it as a String. Storing (base 10) 255 is no different than (base 16) 0xFF to Java. You can use Rok's suggestion and do something like this:
As I was trying to explain to you, to Java there is no difference between these statements:
You can already store hex values as ints (and use Integer.toHexString() to display as a hex String). Java doesn't store any 'formatting' in primitives.