Quickly convert a char to a zero padded hex string

Integer.toHexString(0x100 | (int) '\f').substring(1).toUpperCase(); // '\f' (linefeed) is '0C' in hex