Code example for URL

Methods: openStream

0
 
		_uri = mDOMAIN + "sites/default/files/styles/" + style + "/public/"
				+ URLEncoder.encode(_uri.substring(9), "UTF-8");
 
		URL url;
		url = new URL(_uri);
 
		InputStream is = null;
		is = url.openStream();
 
		return BitmapFactory.decodeStream(is);
	} 
 
	public Bitmap download(String _uri, String _filesystem, String style)
			throws IOException { 
 
		_uri = mDOMAIN + _filesystem + "/styles/" + style + "/public/"
				+ URLEncoder.encode(_uri.substring(9), "UTF-8");
 
		URL url;
		url = new URL(_uri);