1 package org.kuali.ole.ingest;
2
3 import java.io.BufferedReader;
4 import java.io.File;
5 import java.io.FileReader;
6 import java.io.IOException;
7
8
9
10
11 public class FileUtil {
12
13
14
15
16
17
18 public String readFile(File file) throws IOException {
19 BufferedReader reader = new BufferedReader(new FileReader(file));
20 String line = null;
21 StringBuilder stringBuilder = new StringBuilder();
22 String ls = System.getProperty("line.separator");
23 while ((line = reader.readLine()) != null) {
24 stringBuilder.append(line);
25 stringBuilder.append(ls);
26 }
27 return stringBuilder.toString();
28 }
29 }