Hi,
Right so, I started my project on creating a Java download manager which is going nicely. The only problem I am seeing at the moment is when i request the content length of the URL. When i use the method provided by HttpUrlConnection's getContentLength, it returns an Int.
This is great if i was only to ever download files that were less than 2GB in file size. Doing some more digging and find that java does not support unsigned int values, but even so that would only give me a file size of a 4GB max.
Can anyone help me in the right direction of getting the content size of a file that is greater than 2GB.
Thanks in advance.
UPDATE
Thanks for you answer Elite Gentleman, i tried what you suggested but that kept returning a null value, so instead what i did was
HttpURLConnection conn = (HttpURLConnection) absoluteUrl.openConnection();
conn.connect();
long contentLength = Long.parseLong(conn.getHeaderField("Content-Length"));
For some reason just using conn.getRequestProperty always returned a null for me