This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to get the file length before download
 
It's not a secret anymore!