HI All, Is there any way we can kill a thread which is reading data with out using stop method(i think Sun is going to depricate this method). which typically could occur when user tries to read a file using java.IO API.
This would generally be done using the interrupt() method. If your thread is blocked on any I/O read/write and its interrupt method is called, a ClosedByInterruptException will be thrown, which you can catch and deal with gracefully in the thread.
You should take a look at the JavaDocs for the Thread class.