Does close ever throw an IOException?

Posted by TofuBeer on Stack Overflow See other posts from Stack Overflow or by TofuBeer
Published on 2009-02-26T00:19:25Z Indexed on 2010/05/20 8:10 UTC
Read the original article Hit count: 223

Filed under:
|
|

After providing some answers here, and reading some comments, it would seem that, in practice IOException is never thrown on close for file I/O.

Are there any cases in which calling close on a Stream/Reader/Writer actually throws an IOException?

If an exception is actually thrown, how should it be dealt with?

© Stack Overflow or respective owner

Related posts about java

Related posts about close