jsoup
jsoup copied to clipboard
Please create PROGRESS method
Hi,
Can you implement a method of progress? It is necessary to indicate the progress of the html page downloaded.
Thanks
Can you please detail what you expect?
Example:
Document doc = Jsoup.connect("http://example.com") .userAgent("Mozilla") .timeout(3000) .onProgress (long totalBytes, long downlaodedBytes, int progress){ tada(); } .post();
What the int progress
parameter is supposed to contain?
The code in the example is invalid Java code. Can you adress this?
What happen if the total size is unknown?
On Tue, Aug 23, 2016 at 6:47 AM +0200, "Sani" [email protected] wrote:
Example:
Document doc = Jsoup.connect("http://example.com") .userAgent("Mozilla") .timeout(3000) .onProgress (long totalBytes, long downlaodedBytes, int progress){ tada(); } .post();
You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/jhy/jsoup/issues/656#issuecomment-241625625
int progress = 0(%) - 100(%) downloaded
The code in the example is invalid Java code. Can you adress this? I know. Just gave the example of the approximate realization to obtain information about how to download the object.
What happen if the total size is unknown? At the beginning of the boot progress = 0. At the end of progress = 100. The intermediate result is unknown.
Please clarify the code with a valid Java example.
In the case of an unknown total size, what value progress should contain?
On Tue, Aug 23, 2016 at 7:26 AM +0200, "Sani" [email protected] wrote:
int progress = 0(%) - 100(%) downloaded
The code in the example is invalid Java code. Can you adress this? I know. Just gave the example of the approximate realization to obtain information about how to download the object.
What happen if the total size is unknown? At the beginning of the boot progress = 0. At the end of progress = 100. The intermediate result is unknown.
You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/jhy/jsoup/issues/656#issuecomment-241630217
Yes I know what you mean, like in the Android Progress methods. Good idea, thanks!
On Mon, Aug 22, 2016, 22:24 Sani [email protected] wrote:
int progress = 0(%) - 100(%) downloaded
The code in the example is invalid Java code. Can you adress this?
I know. Just gave the example of the approximate realization to obtain information about how to download the object.
What happen if the total size is unknown?
At the beginning of the boot progress = 0. At the end of progress = 100. The intermediate result is unknown.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhy/jsoup/issues/656#issuecomment-241630217, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEshl_OS2cjWdsrLu1uMqkPjATsj9xXks5qioQdgaJpZM4Giuog .
It I think this could be implemented by just returning the position of the byte stream every time an element is hit