import java.io.*;
public class Output {
public static void main(String[] args){
String json = "null";
try {
json = readJsonData("I:\\History_Project\\echarts\\life-expectancy.json");
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(json);
}
public static String readJsonData(String pactFile) throws IOException {
StringBuffer strbuffer = new StringBuffer();
File myFile = new File(pactFile);
if (!myFile.exists()) {
System.err.println("Can't Find " + pactFile);
}
try {
FileInputStream fis = new FileInputStream(pactFile);
InputStreamReader inputStreamReader = new InputStreamReader(fis, "UTF-8");
BufferedReader in = new BufferedReader(inputStreamReader);
String str;
while ((str = in.readLine()) != null) {
strbuffer.append(str);
}
in.close();
} catch (IOException e) {
e.getStackTrace();
}
return strbuffer.toString();
}
}