1 package org.kuali.ole.docstore.xstream;
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
12
13
14
15 public class FileUtil {
16
17 public String readFile(File file) throws IOException {
18 BufferedReader reader = new BufferedReader(new FileReader(file));
19 String line = null;
20 StringBuilder stringBuilder = new StringBuilder();
21 String ls = System.getProperty("line.separator");
22 while ((line = reader.readLine()) != null) {
23 stringBuilder.append(line);
24 stringBuilder.append(ls);
25 }
26 return stringBuilder.toString();
27 }
28 }