java - stop thread that does not get interrupted -


I have a thread that sits and reads Object Objects of InputStream:

  Public Zero Run (try {ois = new ObjectInputStream (clientSocket.getInputStream ()); Object o; While (o = ois.readObject ())! = Null) {// do something with the object}} hold (exception pre) {// log exception}}  

does not readObject throw the exception exception and as far as I tell No exceptions are given when this thread is interrupted. Call call on the socket input stream

. You should be able to do this.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -