private String paramsToString(){
  StringBuilder result=new StringBuilder();
  if (!parameters.isEmpty()) {
    for (    Map.Entry<String,String> entry : parameters.entrySet()) {
      if (result.length() == 0) {
        result.append("?");
      }
 else {
        result.append("&");
      }
      result.append(entry.getKey());
      result.append("=");
      result.append(entry.getValue());
    }
  }
  return result.toString();
}

private String paramsToString ( ) { StringBuilder result = new StringBuilder ( ) ; if ( ! parameters . isEmpty ( ) ) { for ( Map . Entry < String , String > entry : parameters . entrySet ( ) ) { if ( result . length ( ) == 0 ) { result . append ( "?" ) ; } else { result . append ( "&" ) ; } result . append ( entry . getKey ( ) ) ; result . append ( "=" ) ; result . append ( entry . getValue ( ) ) ; } } return result . toString ( ) ; }
convert the parameters into a string of ? name = value & othername = othervalue
