jsr340-experts@servlet-spec.java.net

[jsr340-experts] Read/WriteListener throws IOException

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Mon, 14 Jan 2013 16:59:32 -0800

In ReadListener#onDataAvailable, #onAllDataRead and
WriteListener#onWritePossible,
it is common to have IO operations.
With the current API, no exception is in the signature of the above methods.
In this case, developers may need to have a try/catch block inside the
above methods
as IOException is probably thrown inside the above methods.

In this case, I suggest to add "throws IOException" in the above four
methods.
And I will leave the #onError methods without "throws IOException" in
this case.

Please let me know if there is any comments.
Shing Wai Chan