public static void writeSearchResponse(SearchResponse response, BufferedWriter out, boolean writeQuery, boolean writeLink, boolean writeTitle, boolean writeSnippet) throws Exception {
		List<SearchResponse.Result> results = response.getResults();
		System.out.println(">>>> WRITE " + results.size() + " RESULTS FOR \"" + response.getRequestedQuery() + "\" TO FILE");
		for (SearchResponse.Result result : results) {
			List<String> fields = new ArrayList<String>();
			if (writeQuery)
				fields.add("\"" + response.getRequestedQuery() + "\"");
			if (writeLink)
				fields.add(result.getLink());
			if (writeTitle)
				fields.add("\"" + result.getTitle() + "\"");
			if (writeSnippet)
				fields.add("\"" + result.getSnippet() + "\"");
			WebSearchLauncher.writeCSVLine(fields, out);
		}
	}