有这个方法
====================================
OutputStream io = null;
try {
io = new FileOutputStream("out.txt");
io.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
io.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
============================================== |