您的位置:首页 > Web前端 > HTML

获取信息生成html页面

2015-09-21 10:15 381 查看
public static boolean setContentToFile(File file, String content) {
boolean bool = false;
BufferedOutputStream output = null;
try {
output = new BufferedOutputStream(new FileOutputStream(file));
output.write(content.getBytes("UTF-8"));
bool = true;
} catch (Exception e) {
bool = false;
e.printStackTrace();
} finally {
if (output != null) {
try {
output.close();
output = null;
} catch (IOException e) {
}
}
}
return bool;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: