code: public static boolean isHexadecimal(String value) {
  
          if (value == null || value.length() == 0) {
              return false;
          }
  
          // validate string is hexadecimal value
          if (! HEX_REGEX_PATTERN.matcher(value).matches()) {
              return false;
          }
  
          return true;
      }
docs: return if the given string is a valid hexadecimal string