I need a java program to download a series of file from a web server and I need to be able to close and then reopen the tcp/ip connection between each file download.
Not sure how to do this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a low-level way of retrieving any information from not only socket 80 (http) but generically to retrieve mail, do a ‘telnet’ etc:
now to do a call to retrieve a page, send the get command, set the content-type, and send two ‘\n’.
There is a higher-level solution:
Send HTTP GET request with header