What happens if a Channel is read after being closed?
Gili
cowwoc at bbs.darktech.org
Thu Aug 27 09:43:41 PDT 2009
Oops, AsynchronousChannel.close()'s Javadoc reads:
"further attempts to initiate asynchronous I/O operations complete
immediately with cause ClosedChannelException."
That being said, shouldn't the read/write methods still document this as an
exception that may be thrown?
Gili
Gili wrote:
>
> The Javadoc talks about what happens if a channel is closed while an
> operation is pending but it says nothing about what happens if someone
> tries reading after a close() operation completed. Shouldn't the methods
> throw an appropriate exception?
>
> Gili
>
--
View this message in context: http://n2.nabble.com/What-happens-if-a-Channel-is-read-after-being-closed-tp3527766p3528051.html
Sent from the nio-discuss mailing list archive at Nabble.com.
More information about the nio-discuss
mailing list