This raises an important question: who's job is it to close an input stream? For example:
InputStream in = ...
BufferedInputStream bufferedIn = new BufferedInputStream(in);
someMethod(bufferedIn);
bufferedIn.close();
Do I still need to call in.close()?
According to the API, I should not call in.close() because BufferedInputStream.close() does that for me.

0 comments:
Post a Comment