private String join(String[] array, String separator) {
    	if (array.length == 0) {
    		return "";
    	}
        String ret = "";

        for (int i = 0; i < array.length; i++) {
            ret += array[i] + separator;
        }
        return ret.substring(0, ret.length() - separator.length());
    }