Java Utililty Methods Char to Hex

List of utility methods to do Char to Hex

Description

The list of methods to do Char to Hex are organized into topic(s).

Method

Stringchar2Hex(char c)
char Hex
byte hi = (byte) (c >>> 8);
byte lo = (byte) (c & 0xff);
return byte2Hex(hi) + byte2Hex(lo);
StringcharToHex(char c)
Returns hex String representation of char c, that is, the hex digits of the Unicode code point for the character.
byte hi = (byte) (c >>> 8);
byte lo = (byte) (c & 0xff);
return byteToHex(hi) + byteToHex(lo);
StringcharToHex(char c)
char To Hex
return Integer.toHexString((int) c).toUpperCase();
bytecharToHex(char c)
char To Hex
byte result = 0x00;
if (c <= '9' && c >= '0') {
    result = (byte) (c - '0');
if (c <= 'F' && c >= 'A') {
    result = (byte) (c - 'A' + 10);
if (c <= 'f' && c >= 'a') {
...
intcharToHexdigit(final byte c)
Converts the provided character into a hexadecimal value.
if (c >= '0' && c <= '9') {
    return c - '0';
} else if (c >= 'A' && c <= 'F') {
    return c - 'A' + 10;
} else {
    return c - 'a' + 10;