what kinds of things throw IOExceptions? I am working on a type of chat server. The way it works is it uses http and tomcat comet. It opens two connections, one two each servlet. the input connection connects to the comet servlet, and the output connection connects to the regular servlet. this is so that the input request is always open, so you can push data to it whenever you feel like, and the output connection only needs to be connected when it is sending a request. my question is, if the connection drops somehow, i will need to reconnect the input connection, but how will i know? will the stream read null or will an IOExcpetion be thrown? I read the docs, and they say null is only read when the stream is closed, but it could also be EOF or exception. i am confused on when the exception is actually thrown