Java Utililty Methods XML Hex

List of utility methods to do XML Hex

Description

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

Method

StringtoHexString(byte[] array)
to Hex String
return DatatypeConverter.printHexBinary(array);
StringtoHexString(byte[] edid)
Converts a byte array to a hexadecimal string
return DatatypeConverter.printHexBinary(edid);
StringtoReadableHexString(byte[] array)
to Readable Hex String
String hex = DatatypeConverter.printHexBinary(array).toUpperCase();
String finalHex = "";
int temp = 0;
for (char current : hex.toCharArray()) {
    if (temp == 2) {
        finalHex += " ";
        temp = 0;
    finalHex += current;
    temp++;
return finalHex;