import java.io.*;
/**
* Created by PC on 2016/8/4.
*/
public class JsonTest {
public static void main(String[] args) throws IOException {
try {
InputStream in = new FileInputStream("C:\\Users\\PC\\Desktop\\comment.txt");
BufferedReader b = new BufferedReader(new InputStreamReader(in));
String d = null;
StringBuilder sd = new StringBuilder();
while ((d = b.readLine()) != null) {
sd.append(d);
sd.append("\n");
}
System.out.println(sd.toString());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
转载于:https://my.oschina.net/u/2489258/blog/727245