How to close IOs?
- by blackdog
when i managed IO, i found a problem. i used to close it like this:
try {
// my code
} catch (Exception e) {
// my code
} finally{
if (is != null) {
is.close();
}
}
but the close method also would throw exception. if i have more than one IO, i have to close all of them. so the code maybe…