public static boolean writeCSV(RiverDB riverDB, String absolutePath) {
		// create output file
        FileWriter outputStream = null;

	    try {
	    	outputStream = new FileWriter(absolutePath);
	    	outputStream.write("Nr.,Land,Fluss,Einstieg,Ausstieg,Entfernung,Km,WW,WW Stufe,Info,Min,Max,Einheit,Teilnehmer,Favorit\n");
	    	int i = 1;
	    	for (River r: riverDB.getAllRivers(true)) {
		    	outputStream.write( i++ + "," + r.getCountry() + "," + r.getRiverName() + "," + r.getTripFrom() + "," +
		    						r.getTripTo() + "," + r.getDistanceToStart() + "," + r.getTripLength() + "," +
		    						r.getWwLevel() + "," + r.getWwTopLevel() + "," + r.getRiverInfo() + "," +
		    						r.getMinWaterLevel() + "," + r.getMaxWaterLevel() + "," + r.getUnitOfWaterLevel() + "," +
		    						r.getDefaultGroupSize());
		    	if (r.getIsFavoured())
		    		outputStream.write(",1\n");
		    	else 
		    		outputStream.write(",0\n");
	    	}
	    	
	    } catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
	    	if (outputStream != null) {
	    		try {
					outputStream.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
	    	}
	    }
		
		return true;
	}