File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to get the file length before download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to get the file length before download " Watch "How to get the file length before download " New topic
Author

How to get the file length before download

Zac Nahas
Greenhorn

Joined: Feb 24, 2004
Posts: 6
Dear All
I am trying to get the size of a file before downloading it. I cannot use the URL method GetContentLength because I'm using Sockets not URLs so is there any other way to do this?
Thanks
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
I don't remember off-head--try posting in Sockets and Internet Protocols or some other similar forum. Or better yet, try searching that forum for the answer before posting!!!
[ February 25, 2004: Message edited by: S. C. Huey ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get the file length before download