codemaniac
codemaniac

Reputation: 891

Grabbing image from URL in Google App Engine, Java

I have a URL which leads to in image. How do I grab this image from this URL into my servlet? NOTE: the web-app is deployed on Google App Engine.

java.net.URL myURL = "http://a3.twimg.com/profile_images/150131301/slogo4_normal.jpg";
//code to grab the image

Thank you!

Upvotes: 2

Views: 902

Answers (1)

Nick Johnson
Nick Johnson

Reputation: 101149

Use the URL Fetch API - either the java.net one, or the low level one, both documented here.

Upvotes: 1

Related Questions