title: Get image by REST call and display on android
body: <p>Here is the link where I place a REST GET call.
  <a href="http://adtouch.cloudfoundry.com/rest/ad/barcode/529a927973654526a309a77986062566/image" rel="nofollow">http://adtouch.cloudfoundry.com/rest/ad/barcode/529a927973654526a309a77986062566/image</a>
  On opening it in browser, it redirects to other link and I get an image displayed.
  I want to display this image on android. I am unable to determine what is the content I get by this call and how to convert it to an image to be displayed on android device.</p>
  
  <p>This is the rest call I make:</p>
  
  <pre><code>HttpClient httpclient = new DefaultHttpClient();  
  String temp = "http://adtouch.cloudfoundry.com/rest/ad/barcode/529a927973654526a309a77986062566/image";
  HttpGet request = new HttpGet(temp);
  HttpResponse response = httpclient.execute(request);
  ResponseHandler&lt;String&gt; handler = new BasicResponseHandler();
  String result =  httpclient.execute(request, handler);
  System.out.println(result);
  </code></pre>
  
  <p>The result of this is numerous sequence of characters like:</p>
  
  <pre><code>(^( ?( ;QE??QE??ÊMÔâ1MT ??²¤i­@íù¨ùhÙQ¶ê??m7Í¡?mFÏ@3|µu]¿Þ§+Uò?\°Ñ³Qçý?o?MiUWt?*¯÷?ª9Jæ·û´Ý¿59_åùi¬Õq$jE¨)ÿ??Á@D°?©ËÒªÆß7Þ«?õ   q?/ÉR+Tr%F?¨(·LÙQ­9]¨Ê´í?½;}??5???¨ßE??º?ôúc÷ ?·éGÍíFæZ??M­K·ûÔè÷?Þ©&lt;¥Û@Æ?ýÚ±üÕEJ7l O?Z³YêÄÒï¨ÕhK{}ë¹¾íZ?&gt;U¨c}?RG@QGðüÍM2®&gt;\·û´??í?l¨ÿ??xßÂ«NUþón }Ênÿ??î­9UR???nÖ?Å·ýÚo?¿Ä»¿Þ©(
  </code></pre>
  
  <p>I know how to set an image to the ImageView but the question is how to get an image from this call.</p>