code: public static byte decodeHexByte(CharSequence s, int pos) {
          int hi = decodeHexNibble(s.charAt(pos));
          int lo = decodeHexNibble(s.charAt(pos + 1));
          if (hi == -1 || lo == -1) {
              throw new IllegalArgumentException(String.format(
                      "invalid hex byte '%s' at index %d of '%s'", s.subSequence(pos, pos + 2), pos, s));
          }
          return (byte) ((hi << 4) + lo);
      }
docs: Decode a 2-digit hex byte from within a string.