Saving a file returned by webserver

C

cyberco

I want to save a file returned by a webserver. Similar to clicking a
link and saving the file from within the webbrowser, I want to do the
HTTP POST and saving of the file from within a Java application. What's
the best way to go ahead?

Cheers,
cyberco
 
K

klynn47

You can create a URL object. If the file you want is a byte file like
an image file, then you can create a BufferedInputStream. If the file
is text, then you can create a BufferedReader. Attach the appropriate
reader to the output stream of the URL.
 
A

Alan Krueger

cyberco said:
I want to save a file returned by a webserver. Similar to clicking a
link and saving the file from within the webbrowser, I want to do the
HTTP POST and saving of the file from within a Java application. What's
the best way to go ahead?

What do you have so far?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top