【发布时间】:2012-08-20 09:37:19
【问题描述】:
有没有比将整个 html 文件读取到单个字符串变量更好的方法:
String content = "";
try {
BufferedReader in = new BufferedReader(new FileReader("mypage.html"));
String str;
while ((str = in.readLine()) != null) {
content +=str;
}
in.close();
} catch (IOException e) {
}
【问题讨论】: