Code example for HttpEntity

Methods: getContent

0
			HttpClient httpclient = new DefaultHttpClient();
			HttpGet httpget = new HttpGet(uri.toString());
			HttpResponse response = httpclient.execute(httpget);
			HttpEntity entity = response.getEntity();
			if (entity != null)
				return entity.getContent();
			else 
				throw new IOException("No HTTP response");
			// Use the regular java stuff 
			// URL url = new URL(uri.toString()); 
 
			// return url.openStream(); 
		} 
	} 
 
	/** 
	 * Get a stream that can be used for serialization 
	 *  
	 * @param context 
	 *            We'll write our data to this context private dir 
Contextual code suggestions in your IDE  Get Codota for Java