Possible Duplicate:
How to know the size of a file before downloading it?
I must download some pdf in my app.
I need to have the filesize before start to download, to show a progress bar, or to notify the user with the standard 'downloading .. ' notification
How to get a file size having a new Url('http://mysite.net//mypdf.pdf') ?
Try using
URLConnection.getContentLength
as above. If the server doesn't specify a length, then you can't know.