Here you can find the source of returnBitMap(String path)
public static Bitmap returnBitMap(String path) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap returnBitMap(String path) throws IOException { URL url = null;//from w w w. ja v a 2s.c o m Bitmap bitmap = null; url = new URL(path); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoInput(true); conn.connect(); InputStream is = conn.getInputStream(); bitmap = BitmapFactory.decodeStream(is); is.close(); return bitmap; } }