FileOutputStream fos = null;
try {
fos = new FileOutputStream("D:\\code\\java\\Stream\\fos.txt");
fos.write("hello".getBytes());
} catch (IOException e) {
e.printStackTrace();
}finally {
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}