View Javadoc

1   package org.kuali.ole;
2   
3   import java.io.BufferedReader;
4   import java.io.File;
5   import java.io.FileReader;
6   import java.io.IOException;
7   
8   /**
9    * Created by IntelliJ IDEA.
10   * User: pvsubrah
11   * Date: 4/2/12
12   * Time: 4:26 PM
13   * To change this template use File | Settings | File Templates.
14   */
15  public class FileUtilForRawMarc {
16      public String readFile(File file) throws IOException {
17          BufferedReader reader = new BufferedReader(new FileReader(file));
18          String line = null;
19          StringBuilder stringBuilder = new StringBuilder();
20          String ls = System.getProperty("line.separator");
21          while ((line = reader.readLine()) != null) {
22              stringBuilder.append(line);
23          }
24          return stringBuilder.toString();
25      }
26  }