[jcifs] SmbFile.getContentLength() limited to 1.125 GB ?
Michael B Allen
ioplex at gmail.com
Sat Jun 28 17:49:20 GMT 2008
On 6/28/08, h3xStream _ <h3xstream at yahoo.ca> wrote:
>
> Simple question : how can i get the exact length of a file?
>
> I'm currently using SmbFile.getContentLength() to obtain the length.
> This method returns the length in byte but in an integer which limited the
> max. length to 1.125 GB
Use SmbFile.length() instead. The getContentLength() method returns an int
so it only returns the lower 32 bits of the real length. The
getContentLength() method is a carry over from the URLConnection interface.
I'm not sure why it doesn't return a long.
Mike
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the jcifs
mailing list