Code example for URL

Methods: getContent

	public static Drawable loadImageFromUrl(String url) {
		URL m;
		InputStream i = null;
		Drawable d = null;
		try { 
			m = new URL(url);
			i = (InputStream) m.getContent();
			d = Drawable.createFromStream(i, "src");
		} catch (IOException e) {
			return null; 
		return d;
	public static byte[] readGifFromUrl(String urls) {
		try { 
			URL url = new URL(urls);
			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
Connect your IDE to all the code out there  Get Codota for Java