...
...
try{
FileInputStream a = new ...();
FileOutputStream b= new ...();
// ...
a.close;
b.close;
}catch (IOException e){
e.printStackTrace();
} finally{
//how to handle it here}
...
}
}
...
try{
FileInputStream a = new ...();
FileOutputStream b= new ...();
// ...
a.close;
b.close;
}catch (IOException e){
e.printStackTrace();
} finally{
//how to handle it here}
...
}
}
FileOutputStream b = null;try {
...
} finally {
try {
if (a != null) a.close();
} catch (IOException e) {
/* 什么都不用做 */
} try {
if (b != null) b.close();
} catch (IOException e) {
/* 什么都不用做 */
}
}