public @Nullable String build() {
    StringBuilder queryString = new StringBuilder();

    for (NameValuePair param : params) {
      if (queryString.length() > 0) {
        queryString.append(PARAM_SEPARATOR);
      }
      queryString.append(Escape.urlEncode(param.getName()));
      queryString.append(VALUE_SEPARATOR);
      queryString.append(Escape.urlEncode(param.getValue()));
    }

    if (queryString.length() > 0) {
      return queryString.toString();
    }
    else {
      return null;
    }
  }
public @ Nullable String build ( ) { StringBuilder queryString = new StringBuilder ( ) ; for ( NameValuePair param : params ) { if ( queryString . length ( ) > 0 ) { queryString . append ( PARAM_SEPARATOR ) ; } queryString . append ( Escape . urlEncode ( param . getName ( ) ) ) ; queryString . append ( VALUE_SEPARATOR ) ; queryString . append ( Escape . urlEncode ( param . getValue ( ) ) ) ; } if ( queryString . length ( ) > 0 ) { return queryString . toString ( ) ; } else { return null ; } }
Build query string.
@return Query string or null if query string contains no parameters at all.