Here you can find the source of saveCCS(Map
public static void saveCCS(Map<String, Double> contributionScore, String diseaseState, String file) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Map; public class Main { public static void saveCCS(Map<String, Double> contributionScore, String diseaseState, String file) throws IOException { File f = new File(file); if (!f.exists()) { f.createNewFile();/*from ww w. j av a2 s .c o m*/ } FileWriter fw = new FileWriter(f.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); bw.write("expression" + "\t" + diseaseState); bw.newLine(); boolean column = false; for (String gene : contributionScore.keySet()) { bw.write(gene + "\t" + contributionScore.get(gene)); bw.newLine(); } bw.close(); } }