-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.java
34 lines (30 loc) · 886 Bytes
/
printer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package biomarker1;
/*
this class builds a csv file with the microsatellite findings
*/
import java.io.FileWriter;
import java.io.PrintWriter;
public class printer {
boolean busy;
public void print(String line) {
busy = true;
FileWriter fichero = null;
PrintWriter pw = null;
try {
fichero = new FileWriter("C:\\Users\\ernes\\OneDrive\\Documents\\mfind_out.csv", true); //change the destination if you like. Create it first!!
pw = new PrintWriter(fichero);
pw.println(line);
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (null != fichero) {
fichero.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
busy = false;
}
}
}