java写入文件,
分享于 点击 7398 次 点评:110
java写入文件,
public void write(String str_ssr, String url) {
//把值读入到文件中
BufferedOutputStream bos = null;
File file = null;
try {
file = new File(url);//https://192.168.20.10/svn/bioc/trunk/OPT
bos = new BufferedOutputStream(new FileOutputStream(file));
byte[] date = str_ssr.getBytes("utf-8");
if (true) {
bos.write(date);
}
} catch (IOException ie) {
ie.printStackTrace();
} finally {
try {
bos.close();
} catch (IOException ie) {
ie.printStackTrace();
}
}
}
相关文章
- 暂无相关文章
用户点评