How can I calculate the file size of an html (just the html) web page with Android?
I tried this:
HttpGet request = new HttpGet(fullUrl);
HttpResponse r
HttpResponse response = client.execute(httpPost);
String content = EntityUtils.toString(response.getEntity());
byte[] bytes = content.getBytes("UTF8");
UPDATE
URL url = new URL("http://server.com/file.mp3");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
int file_size = urlConnection.getContentLength();