Android: load image
<p>Trying to load and display image from server.</p>

<pre><code>public static Bitmap loadImageByURL(final String url,
        final Context context, final HttpClient httpClient) {
            HttpGet httpget = new HttpGet(url);
            HttpResponse response = httpClient.execute(httpget);
            HttpEntity entity = response.getEntity();
            if (entity != null) {
                data = entity.getContent();
            }
        }
        bitmap = BitmapFactory.decodeStream(data);
    } catch (Exception e) {
        // TODO: handle exception
    }
    return bitmap;
}
</code></pre>

<p>But bitmap is always null !!! What I do wrong ? URL is fine, its works in browser and on iOS.</p>

<p>EDIT 1:</p>

<p>when I open url in browser, its shows me something like that:</p>

<pre><code>/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYEBQYFBAYGBQYHBwYIChAKCgkJChQO DwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSgBBwcHCggK EwoKEygaFhooKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo KCgoKCgoKCgoKP/AABEIAZABLAMBEQACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAA AAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQci cRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeo qaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5 +gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncA AQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYn 
</code></pre>

<p>What is that ? )</p>
