code: private void addEncodedValue(final StringBuilder urlBuilder,
              final String name, String value) {
          if (value != null) {
              String encodedValue;
              if (!"to".equals(name) && !urlBuilder.toString().endsWith("?")) {
                  urlBuilder.append('&');
              }
              try {
                  encodedValue =
                          URLEncoder.encode(value, "utf-8").replace("+", "%20");
              } catch (UnsupportedEncodingException e) {
                  LOG.error("UTF-8 encoding not supported during encoding "
                          + value, e);
                  encodedValue = value;
              }
              if (!"to".equals(name)) {
                  urlBuilder.append(name).append('=');
              }
              urlBuilder.append(encodedValue);
          }
      }
docs: Added more information to the urlbuilder.
  
  @param urlBuilder an urlbuilder.
  @param name the name of the attribute.
  @param value the value.