Java BufferedReader Read loadQueryFromFile(String queryFile)

Here you can find the source of loadQueryFromFile(String queryFile)

Description

load Query From File

License

Open Source License

Declaration

static String loadQueryFromFile(String queryFile) throws IOException 

Method Source Code


//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());
    }
}

Related

  1. loadNameMap(String mapName, boolean reverseMap)
  2. loadNumUsers(String fileName)
  3. loadPartitions(String fileName)
  4. loadPathPreferencesFromFile(File inputFile)
  5. loadPrivateKeyFile(File privateKeyFile)
  6. loadQueryNodeInfo(String input_file)
  7. loadReaderFromClasspath(Class c, String filename)
  8. loadReaderToList(Reader reader)
  9. loadRealDataGraphFromEmbers(String fileName, String splitter)