public static String[] split(String source, String delim) {
		if (source == null) {
			throw new IllegalArgumentException();
		}
		if (delim == null || "".equals(delim.trim())) {
			delim = ",";
		}
		StringTokenizer tokenizer = new StringTokenizer(source, delim);
		List<String> list = new ArrayList<String>();
		while (tokenizer.hasMoreTokens()) {
			list.add(tokenizer.nextToken());
		}
		String[] array = new String[list.size()];
		return list.toArray(array);
	}