Filip Hanik - Dev Lists wrote:
yes, but that's ok. the sequence would be this
a) available() == 1
b) InputStream.read() == 0
c) available() == 0
what this would mean, is that available()==1 means there is data fetched
from the actual socket, may or may not translate into user data.
In the sequence above, that is such a case, available returned 1, cause
there was data, read returned 0 cause it didn't translate into user
data, and further attempts to available() showed that there were no more
data to be fetched.
When new data comes in, available() (non blocking) again shows up as 1,
InputStream.read() may or may not return data.
I personally, think this would be an extremely elegant way to do non
blocking read, as this would also be useful for regular servlets.
No, I don't agree with reading bytes in the lower layer as it would
swallow problems even more than doing it in the adapter without any
additional benefit (BTW, read cannot return 0). There's also a likely
problem that it would require additional structures to hold that data,
and which are present in the adapter.
Rémy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]