Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

save image file from remote URL  RSS feed

 
Sham Jowsaki
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL,
I would like to know tht how to save an image file from remote URL to my local system.
for eg. http://www.xyz.com/sham.gif wants to store in my local system c:\sham.gif.
Pls give your valuable suggestion with examples how to do.
Thanks
Jowsaki
 
kainil
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mr. Sham ........
Can u describe yr question because this is not understanble.
saving process in explorer is it's on process so no need to take of it.So pl tell what u want ?
kkjava
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a URL object.
Use URL.openConnection to get a URLConnection.
Get the InputStream from the URLConnection.
Read from the InputStream and write what you get to a file.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kkjava-
I would like to once again remind you are in violation of JavaRanch's Naming Policy. Please change your display name, you can do so here.
Failure to comply with this one simple policy usually results in account lockout and you will be forced to reregister.
Thanks!
(sorry for the hijack guys).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!