aspose file tools
The moose likes Beginning Java and the fly likes Read an image from a URL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Read an image from a URL" Watch "Read an image from a URL" New topic
Author

Read an image from a URL

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi,

I am creating a simple SWT application where user can enter a url that leads to an image
file. The application can then save it to any location on the user directory.

From the net, I saw this code but this one is unable to read an image even if it is a vlaid http path.


Do someone had an idea how to go about with this?


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Sandeep Kumar B
Ranch Hand

Joined: Jul 10, 2011
Posts: 40
Any exceptions you are getting?
Sandeep Kumar B
Ranch Hand

Joined: Jul 10, 2011
Posts: 40
This code works for me

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Sandeep,

My bad... I forgot about the company proxy...

And by the way, I change my implementation. I will use HttpClient instead rather than create cod eof my own.

Thanks for taking a look...
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Read an image from a URL
 
Similar Threads
Pasting Images Problem
How to retrieve images from mysql database into a portlet
How to make an image a component for JScrollPane ?
How to make an image a component for JScrollPane ?
ImageIcon