i have a weird thing when downloading file from an URL in my program.
I perform check of available updates of files on server by checking same file’s size on the device and on the server. When i use getContentLength method of URLConnection class i get one size, then i download and check the downloaded size by bytes which get downloaded and get same size. But when i look at the size of the files on the SDCard they are about 1.4 times bigger. Why does this happen?
So, basically i download one size and get different on SDCard and thats why i can’t check if they are updated by asking the server.
URL is of https type, files are .ics
i have a weird thing when downloading file from an URL in my program.
Share
Solved. The problem was with the encoding. I had to use OutputStreamWriter with secon parameter “UTF8”. And that aswell solved the problem with cyrylic letters in the text.