code: private static final List<String> tokenizeArguments(String args) {
  		List<String> list = new ArrayList<String>();
  		StringBuilder curr = new StringBuilder();
  
  		int pos = 0;
  		boolean quoted = false;
  
  		while (pos < args.length()) {
  			char c = args.charAt(pos);
  			if ((c == ' ' || c == '\t') && !quoted) {
  				if (curr.length() > 0) {
  					list.add(curr.toString());
  					curr.setLength(0);
  				}
  			} else if (c == '"') {
  				quoted = !quoted;
  			} else {
  				curr.append(c);
  			}
  
  			pos++;
  		}
  
  		if (quoted) {
  			throw new IllegalArgumentException("Unterminated quoted string.");
  		}
  
  		if (curr.length() > 0) {
  			list.add(curr.toString());
  		}
  
  		return list;
  	}
docs: Utility method that takes the given arguments, splits them at the whitespaces (space and tab) and
  turns them into an array of Strings. Other than the <tt>StringTokenizer</tt>, this method
  takes care of quotes, such that quoted passages end up being one string.
  
  @param args
  The string to be split.
  @return The array of split strings.