How to check if HttpURLConnection exists using the object, which was open before
Joined: Sep 10, 2010
I am looking for a solution for this problem eagerly
I am creating a HttpURLConnection to a URL and getting feed from it after 'SUCCESS' response code. The feed I am using has a chance to go off, when there is some issue. Is there any way to identify if the connection is still active using the same connection object I created. I tried getting response code of the connection, which is returning 200-OK always, even if the stream/feed has gone off. Could any one help me out in this...
I have given the snippet below, Please let me know if I need to furnish any more details
Even the readLine() method could able to return a line(after the connection gone off), as it is using buffer, so I couldn't able to come out and reconnect.