In my finally clause I clean up any streams, e.g.,
finally // Clean up
{
if (os != null) {
try {
os.close();
}
catch (IOException ioe) {
logger.warn("Failed to close outputStream", ioe);
}
}
if (is != null) {
try {
is.close();
}
catch (IOException ioe) {
logger.warn("Failed to close inputStream", ioe);
}
}
But I see that the Streams remain non-NULL even after closing. So is it wrong to check for NULL? Or do I not see the result of close
?