title: Trying to follow URL and then download image
body: <p>I'm writing a java program that goes out and searches twitter, finds certain instagram links, and then downloads the instagram image to a directory. I've written all of the code to do the twitter searching and image saving but the problem that I'm having is that I get a URL in the following format</p>
  
  <p><code>http://t.co/xxxxxxxx</code></p>
  
  <p>From the twitter search which then if followed resolves to an instagram URL such as</p>
  
  <p><code>http://instagr.am/p/xxxxxxxxxx/</code></p>
  
  <p>How can I go about resolving the original URL to the instagram URL and then downloading the appropriate image on that page?</p>