code: private static String getUrlParameters(
          final Collection<Pair<String,String>> parameters, 
          final boolean formEncoding)
          {
          final StringBuilder sb = new StringBuilder ();
          final Iterator<Pair<String,String>> i = parameters.iterator ();
          
          if (i.hasNext ())
              {
              final Pair<String,String> first = i.next ();
              
              sb.append ('?');
              sb.append (getKeyValuePair (first, formEncoding));
              
              while (i.hasNext ())
                  {
                  final Pair<String,String> current = i.next ();
                  
                  sb.append ('&');
                  sb.append (getKeyValuePair (current, formEncoding));
                  }
              
              return sb.toString ();
              }
          else
              {
              return sb.toString ();
              }
          }
docs: Returns a string that encodes a collection of key/value parameters for
  URL use.
  
  @param parameters The collection of key/value parameters.
  
  @return A string that encodes the collection of key/value parameters for
  URL use.