Here you can find the source of saveColumn(int[] density, String filename)
public static void saveColumn(int[] density, String filename) 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; public class Main { public static void saveColumn(int[] density, String filename) throws IOException { BufferedWriter bw = new BufferedWriter(new FileWriter(new File(filename))); for (int n : density) { bw.write(Integer.valueOf(n).toString() + "\n"); }/* w w w.ja va 2 s . c om*/ bw.close(); } }