code: public static String convertToBitcoinURI(NetworkParameters params,
                                               String address, @Nullable Coin amount,
                                               @Nullable String label, @Nullable String message) {
          checkNotNull(params);
          checkNotNull(address);
          if (amount != null && amount.signum() < 0) {
              throw new IllegalArgumentException("Coin must be positive");
          }
          
          StringBuilder builder = new StringBuilder();
          String scheme = params.getUriScheme();
          builder.append(scheme).append(":").append(address);
          
          boolean questionMarkHasBeenOutput = false;
          
          if (amount != null) {
              builder.append(QUESTION_MARK_SEPARATOR).append(FIELD_AMOUNT).append("=");
              builder.append(amount.toPlainString());
              questionMarkHasBeenOutput = true;
          }
          
          if (label != null && !"".equals(label)) {
              if (questionMarkHasBeenOutput) {
                  builder.append(AMPERSAND_SEPARATOR);
              } else {
                  builder.append(QUESTION_MARK_SEPARATOR);                
                  questionMarkHasBeenOutput = true;
              }
              builder.append(FIELD_LABEL).append("=").append(encodeURLString(label));
          }
          
          if (message != null && !"".equals(message)) {
              if (questionMarkHasBeenOutput) {
                  builder.append(AMPERSAND_SEPARATOR);
              } else {
                  builder.append(QUESTION_MARK_SEPARATOR);
              }
              builder.append(FIELD_MESSAGE).append("=").append(encodeURLString(message));
          }
          
          return builder.toString();
      }
docs: Simple Bitcoin URI builder using known good fields.
  
  @param params The network parameters that determine which network the URI
  is for.
  @param address The Bitcoin address
  @param amount The amount
  @param label A label
  @param message A message
  @return A String containing the Bitcoin URI