I thought of that, but I'm not sure if I can use HttpClient because I'm sandboxed. I thought of checking content-length but I figured that if it took that long to read the content-type header that it would be same for content-length since they're both headers. Does it read the content-length first?
And how are the timeouts supposed to be used? I assume itd be a time length til it cancels the connection, but apparently not? Unless im using it wrong. Any input on this? Thanks the assistance
Main Topics
Browse All Topics





by: objectsPosted on 2009-07-02 at 17:23:09ID: 24769037
you can also check the content length to determine the amount of data
there is no way to set a timeout on URLConnection, you would need to implement that yourself by for example timing out the thread that is pulling the file
HttpClient though would be better for handling it instead of urlconnection