Here you can find the source of joinCommandLine(ArrayList
Parameter | Description |
---|---|
lsCmdl | the list of argument strings |
public static String joinCommandLine(ArrayList<String> lsCmdl)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; public class Main { /**//w w w. j a v a 2s .c o m * Joins a command line to a string. * @param lsCmdl the list of argument strings * @return the command line string */ public static String joinCommandLine(ArrayList<String> lsCmdl) { String sCmdl = ""; if (lsCmdl != null) for (int i = 0; i < lsCmdl.size(); i++) if (lsCmdl.get(i) != null && lsCmdl.get(i).length() > 0) { if (i > 0) sCmdl += " "; sCmdl += lsCmdl.get(i); } return sCmdl; } }