 <pre><code>String urldisplay="http://www.google.com/";//sample url Log.d("url_dispaly",urldisplay); try{ InputStream in = new java.net.URL(urldisplay).openStream(); Bitmap mIcon11 = BitmapFactory.decodeStream(new SanInputStream(in)); } catch(Exception e){} </code></pre> <p>Create class name SanInputStream</p> <pre><code>public class SanInputStream extends FilterInputStream { public SanInputStream(InputStream in) { super(in); } public long skip(long n) throws IOException { long m = 0L; while (m &lt; n) { long _m = in.skip(n-m); if (_m == 0L) break; m += _m; } return m; } } </code></pre>