Java BufferedReader Read loadJson(String path)

Here you can find the source of loadJson(String path)

Description

load Json

License

Open Source License

Declaration

public static String loadJson(String path) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static String loadJson(String path) throws IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(path), "UTF-8"));
        StringBuilder stringBuilder = new StringBuilder();
        String line = null;//w ww.  j  a  v a 2s  .c o  m

        while ((line = reader.readLine()) != null) {
            stringBuilder.append(line);
        }

        return stringBuilder.toString();

    }
}

Related

  1. loadInputStream(InputStream inputStream)
  2. loadInt(BufferedReader br)
  3. loadIntegersFromFile(String filename)
  4. loadIntoString(InputStream is)
  5. loadJCC()
  6. loadKey(String filename)
  7. loadLastExpInfo(String lastExpFileName)
  8. loadLine(InputStream load)
  9. loadLineByLineAndTrim(String file_path)