Hi!
I want to know the progress of some download.
When I'm getting some resource from the internet,
like this:
String myFeed = request.getURI().toString();
URL url = new URL(myFeed);
URLConnection connection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) connection;
int responseCode = httpConnection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
InputStream in = httpConnection.getInputStream();
// Process the input stream
}
When "InputStream in = httpConnection.getInputStream();" is called,
all the content of the file is downloaded at once.
If I use:
htttpResponse = httpClient.execute(httpRequestBase);
The problem is the same.
How can I detect the actual progress of the download?
Thank you all!