• Post Reply Bookmark Topic Watch Topic
  • New Topic

Save image from a URL  RSS feed

 
Mark Hughes
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

Hope all are well, Any body give advice on this prob?

Whats the best method for saving an image into memory based on a url of the image using Java EE/SE, most examples ive seen use swing, awt etc, im not using these librarys.
Id like to have the image downloaded base don URl and passed into a byte[] variable or InputStream variable.
All help appreciated.

Best
Mark
 
Joe Ess
Bartender
Posts: 9439
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same way one would download text from a URL, only using a Stream rather than a Reader.
 
Mark Hughes
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh ok. thanks Joe, the best solutions are the simple ones lol.

Best
Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!