DataInputStream in;
byte[] b = new byte[1024];
for (;;){
in.read(b);
//do something
}
I have the above code. In another thread i am handling some other events. In this thread i want to cancel the read operation shown in the above code. How can i do?