code: private static byte mapToByte(char a, char b) {
          int ai = intValue(a);
          int bi = intValue(b);
          return (byte) ((ai << 4) | bi);
      }
docs: Map two hex characters to 4-bit numbers and combine them to produce 8-bit number in byte.
  @param a First hex character.
  @param b Second hex character.
  @return Byte representation of given hex characters.