Java 输入流BufferedReader使用(按行读取)

public class Json2geojson {
    public static void main(String[] args) throws IOException {

        StringBuffer sb = new StringBuffer();

        FileReader fr = new FileReader("D:\\Develop\\idea_workspace\\gisserver\\src\\main\\java\\cn\\szl\\tools\\heatmap.json");
        BufferedReader br = new BufferedReader(fr);
        String line = null;
        double lon;
        double lat;

        while ((line = br.readLine()) != null) {
            System.out.println(line);
        }
    }

}

你可能感兴趣的:(Java,java,BufferedReader)