code: public String getQuery( URIContext uriContext )
      {
          if(_parameters == null || !_parameters.hasParameters())
              return null;
  
          String paramSeparator = AMP_ENTITY;
          if ( uriContext == null )
          {
              uriContext = getDefaultContext();
          }
  
          if ( !uriContext.useAmpEntity() )
          {
              paramSeparator = AMP_CHAR;
          }
  
          InternalStringBuilder query = new InternalStringBuilder( 64 );
          boolean firstParam = true;
          for(Iterator iterator = _parameters.iterator(); iterator.hasNext(); ) {
              QueryParameters.Parameter parameter = (QueryParameters.Parameter)iterator.next();
              String name = parameter.name;
              String value = parameter.value;
  
              if (firstParam)
                  firstParam = false;
              else query.append( paramSeparator );
  
              query.append( name );
  
              /* todo: does the '=' need to be here in order for the parsing to work correctly? */
              if(value != null) {
                  query.append( '=' ).append( value );
              }
          }
  
          return query.toString();
      }
docs: Returns the query string (encoded/escaped).
  
  <p> The context states whether or not to use the default delimiter,
  usually the &quot;&amp;amp;&quot; entity, to separate the parameters.
  Otherwise, the &quot;&amp;&quot; character is used. </p>
  
  @param uriContext has property indicating if we use the HTML Amp entity
  to separate the query parameters.
  @return encoded query string.