Ok so I’m making a better downloader for rsps caches and what I’m currently working on is a concurrentDownloader implementing threads to download file segments and assemble them post process but I’ve run into a bit of a snag being that the downloader in the client used http connections which allowed it to monitor what was coming in there for providing a down speed calculation and percentage unfortunately to download a file in segments you need to snatch the file size from the http header and divide it by the segments you want to download this creates a problem because after this the httpconnection is already opened and you can’t add properties to the header even if you close and open the connection again my specific problem is the “Range:” attribute which I need to post to be able to download only a certain part of the stream…
Any suggestions?
Oh! and this is client side only there is no accompanying server.
Edit: Well that problem was solved but as this is still a work in progress I suppose I’ll keep asking whenever I get stuck so onto my next problem…
So… I noticed my buffered reader allows the connection to die for x seconds before it throws this error: SSL peer shut down incorrectly
Anyone know how to set the timeout for this?
Edit: So everything now seems to be working pretty well except for one thing I’m having trouble with variable access…
My threads are overwriting each other’s variables and I don’t understand why everything is instanced and I’m even using local method variables any ideas?