Here you can find the source of readFile(File resultFile)
public static String readFile(File resultFile) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class Main { public static String readFile(File resultFile) throws IOException { StringBuilder result = new StringBuilder(); // InputStream fileIn = GryphonResultUtil.class.getResource(resultFile).openStream(); InputStream fileIn = new FileInputStream(resultFile); try {/*www.j a va 2 s. c o m*/ BufferedReader reader = new BufferedReader( new InputStreamReader(fileIn)); try { String line; while ((line = reader.readLine()) != null) { result.append(line); result.append("\n"); } return result.toString(); } finally { reader.close(); } } finally { fileIn.close(); } } }