I am trying to download a webpage, through a proxy server, as an InputStream. Then I read the InputStream into a buffer (byte) and feed it to a ByteArrayOutputStream. After few iterations in the while loop, it hangs ... This only occurs if the webpage is of large size or if there are several links in the main page and each link has to be extracted in a loop.
There is no problem if the proxy is removed from the picture. I have pasted the code sample at the very end.
Any suggestions would be of great help.
Thanks in advance,
--------------- CODE SAMPLE ----------->
/** The argument InputStream is extracted for any website */