code: public static String formURLEncode(String string) {
          Preconditions.checkNotNull(string, "Cannot encode null string");
  
          try {
              return URLEncoder.encode(string, UTF_8);
          } catch (UnsupportedEncodingException uee) {
              throw new IllegalStateException(ERROR_MSG, uee);
          }
      }
docs: Translates a string into application/x-www-form-urlencoded format
  
  @param plain
  @return form-urlencoded string