docs: private static boolean needsEncoding(String s, boolean relax, boolean[] unreserved) {
          int len = s.length();
          for (int i = 0; i < len; ++i) {
              char c = s.charAt(i);
              if (c == '%' && relax) {
                  continue;
              }
              if (c > unreserved.length) {
                  return true;
              }
              if (unreserved[c] == false) {
                  return true;
              }
          }
          return false;
      }