• Post Reply Bookmark Topic Watch Topic
  • New Topic

Read an image from a URL  RSS feed

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any exceptions you are getting?
 
Sandeep Kumar B
Ranch Hand
Posts: 45
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code works for me

 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!