How to download a file from a server using Java Socket?

Posted by Ada on Stack Overflow See other posts from Stack Overflow or by Ada
Published on 2010-12-20T22:25:05Z Indexed on 2010/12/26 1:54 UTC
Read the original article Hit count: 515

Filed under:
|
|

Hi, I have an assignment about uploading and downloading a file to a server. I managed to do the uploading part using Java Sockets however I am having a hard time doing the downloading part. I should use Range: for downloading parellel. In my request, I should have the Range: header. But I don't understand how I will receive the file with that HTTP GET request. All the examples I have seen was about uploading a file. I already did it. I can upload .exe, image, .pdf, anything and when I download them back (by my browser), there are no errors. Can you help me with the downloading part? Can you give me an example beacuse I really didn't get it.

© Stack Overflow or respective owner

Related posts about java

Related posts about homework