The Artima Developer Community
Sponsored Link

Java Answers Forum
Download a JPG from URL to local file

1 reply on 1 page. Most recent reply: May 10, 2004 3:39 AM by Sushil Srivastava

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
tsigo

Posts: 3
Nickname: tsigo
Registered: Jan, 2004

Download a JPG from URL to local file Posted: May 3, 2004 9:02 PM
Reply to this message Reply
Advertisement
If I have the URL of a remote JPG file - www.server.com/images/file.jpg and want to save it to, say, Application Path\images\myfile.jpg, how would I do that?


Sushil Srivastava

Posts: 6
Nickname: sushilsri
Registered: May, 2004

Re: Download a JPG from URL to local file Posted: May 10, 2004 3:39 AM
Reply to this message Reply
If thats what you want to achieve . Open the JPG in IE and do a save as and there you go.To do that via Java you would perhaps need to use File related part of API or altreantively if you were using servlets then ServletInputStream could be manipulated to create a new file on your local machine.Again using the File related APIs

Flat View: This topic has 1 reply on 1 page
Topic: Problem compiling jsp Previous Topic   Next Topic Topic: Help with Assignment

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use