Android: limiting/throttling downloadmanager
<p>I'm pretty new to android, but there seems to be two main ways to download a file in android, download manager and this method:</p>

<pre><code>        byte data[] = new byte[1024];
        long total = 0;
        int count;
        while ((count = input.read(data)) != -1) {
            total += count;
            // publishing the progress....
            publishProgress((int) (total * 100 / fileLength));
            output.write(data, 0, count);
        }
</code></pre>

<p>I need to be able to throttle a download on the app's end(large file, low bandwidth), is there a way to do this (preferably in download manager) in either method? If I reduced <code>data[]</code> from <code>[1024]</code> to <code>[512]</code>, would that accomplish it by taking smaller chunks at a time?</p>

<p>Thanks.</p>
