code: private static int decodeHex(final char c) {
      if (c < '0') {
        return INVALID;
      }
      if (c <= '9') {
        return c - '0';
      }
      if (c < 'A') {
        return INVALID;
      }
      if (c <= 'F') {
        return c - 'A' + 10;
      }
      if (c < 'a') {
        return INVALID;
      }
      if (c <= 'f') {
        return c - 'a' + 10;
      }
      return INVALID;
    }
docs: Decode a hex nibble. E.g. '3' -> 3 and 'F' -> 15.