code: public static String concatenate(Collection<HttpParameter> parameters) throws HttpClientException {
  		StringBuilder buffer = new StringBuilder();
  		for(HttpParameter parameter : parameters) {
  			if(parameter.getType() == Type.FILE) {
  				logger.error("parameters '{}' has type '{}' and cannot be URL-encoded", parameter.getName(), parameter.getType().name());
  				throw new HttpClientException("Error URL-encoding a parameter of type 'FILE'");
  			}
  			buffer.append(buffer.length() > 0 ? "&" : "");
  			try {
  				buffer
  					.append(URLEncoder.encode(((HttpTextParameter)parameter).getName(), "UTF-8"))
  					.append("=")
  					.append(URLEncoder.encode(((HttpTextParameter)parameter).getValue().toString(), "UTF-8"));
  			} catch(UnsupportedEncodingException e) {
  				// NOTE: this should NEVER NEVER happen!
  				logger.error("unsupported encoding", e);
  			}
  		}
  		return buffer.toString();
  	}
docs: Concatenates a list of HTTP parameters (which must NOT be of type "FILE")
  and URL-encodes them.
  
  @param parameters
  a list of {@link HttpParameter}s.
  @return
  a string representation of the key/value pairs, joined via the ampersand.
  @throws HttpClientException
  if a "FILE" parameter was provided.