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;
}
获取信息生成html页面
最新推荐文章于 2024-08-17 14:58:02 发布