Download Files From Webserver

  • Thread starter Christophe Vanfleteren
  • Start date
A

Andrew

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'd like to be able to connect to a web server and download a file. Is
there some way to do this? Some tips would be nice, thanks.

I'm just running a normal application, not a web application.

- --
[A n d r e w]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/ga9bx4nopx2ZsVURAjOOAJ4rsv+m+tzVtpOwlLD6wkkigyktwwCbBy3u
+oeuETeL86h4fC4c19NcSU0=
=HDlY
-----END PGP SIGNATURE-----
 
S

Steve W. Jackson

:-----BEGIN PGP SIGNED MESSAGE-----
:Hash: SHA1
:
:I'd like to be able to connect to a web server and download a file. Is
:there some way to do this? Some tips would be nice, thanks.
:
:I'm just running a normal application, not a web application.
:
:- --
:[A n d r e w]
:-----BEGIN PGP SIGNATURE-----
:Version: GnuPG v1.2.3 (GNU/Linux)
:
:iD8DBQE/ga9bx4nopx2ZsVURAjOOAJ4rsv+m+tzVtpOwlLD6wkkigyktwwCbBy3u
:+oeuETeL86h4fC4c19NcSU0=
:=HDlY
:-----END PGP SIGNATURE-----
:

Since Java is pretty much inherently "network literate" you may want to
peruse some of the classes in the java.net package. You can construct a
URL pointing to the file on the web server you want, make your own
connection, retrieve the file, etc.

= Steve =
 
H

Harald Hein

Andrew said:
I'd like to be able to connect to a web server and download a
file. Is there some way to do this? Some tips would be nice,
thanks.

I'm just running a normal application, not a web application.

Use a URLConnection, get the input stream from the connection and read
your data. The networking tutorial on the sun java web site has a
similar example.
 
A

Andrew

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew wrote:
| I'd like to be able to connect to a web server and download a file. Is
| there some way to do this? Some tips would be nice, thanks.
|
| I'm just running a normal application, not a web application.
|

Thanks for all that.

- --
[A n d r e w]
- ------|------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/gvfGx4nopx2ZsVURAmsPAKCC+HIMmXzywvrQG3t+7MCTSKhO0ACfTgir
nUHUI+5rtXDJiWO1DDC2BnE=
=W3V6
-----END PGP SIGNATURE-----
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top