Exemplo n.º 1
0
  private String[] formCmdLine(String cmd) {

    StringTokenizer st = new StringTokenizer(cmd);
    int count = st.countTokens();
    String[] cmdLine = new String[count];
    count = 0;

    while (st.hasMoreTokens()) {
      cmdLine[count++] = st.nextToken();
    }

    return cmdLine;
  }
 /**
  * Delimits a comma separated preference and add the items to the given set
  *
  * @param set
  * @param preference
  */
 private void addExtraChoices(Set<String> set, String preference) {
   StringTokenizer tokenizer = new StringTokenizer(preference, ","); // $NON-NLS-1$
   while (tokenizer.hasMoreTokens()) {
     set.add(tokenizer.nextToken().trim());
   }
 }