Here you can find the source of loadQueryFromFile(String queryFile)
static String loadQueryFromFile(String queryFile) throws IOException
//package com.java2s; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class Main { static String loadQueryFromFile(String queryFile) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(queryFile)); StringBuffer sb = new StringBuffer(); String line;/*from ww w .ja v a2 s . co m*/ while ((line = reader.readLine()) != null) { sb.append(line).append("\n"); } reader.close(); return (sb.toString()); } }