check download progress
<p>I m download by following way and its working fine.But want to check at which time each chunk is coming.</p>

<p>File file = new File(extStorageDirectory+"/"+runInBackend.count+sche.file_name);</p>

<pre><code>HttpURLConnection connection = (HttpURLConnection)url.openConnection();

   connection.setDoOutput(true);

   connection.setConnectTimeout(sche.TimeOut);

   connection.setRequestMethod("POST");

   String status = connection.getHeaderField(0);//getResponseMessage();

   if(status != null &amp;&amp; status.contains("200"))

    {
            InputStream is = connection.getInputStream();

            BufferedInputStream bis = new BufferedInputStream(is);

            ByteArrayBuffer baf = new ByteArrayBuffer(50);

            int current = 0;

            long totalBytesRead = 0;
                 while ((current = bis.read()) != -1) 

                 {
                     baf.append((byte) current);

                     totalBytesRead ++;

                 }
                 FileOutputStream fos = new FileOutputStream(file);

                 fos.write(baf.toByteArray());

                 fos.close();
</code></pre>

<p>Is there any way to check download progress of any fie, that is at what time each chunk is coming.</p>

<p>plzz help...</p>

<p>Thanks</p>
