Code example for BufferedHttpEntity

Methods: getContent

0
		// InputStream response = connection.getInputStream(); 
 
		HttpGet httpRequest = new HttpGet(urlString);
		HttpClient httpclient = new DefaultHttpClient();
		HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);
		BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(response.getEntity());
		return bufHttpEntity.getContent();
 
	} 
 
	/** 
	 * A patched InputSteam that tries harder to fully read the input stream. 
	 */ 
	static class FlushedInputStream extends FilterInputStream {
		public FlushedInputStream(InputStream inputStream) {
			super(inputStream);
		} 
 
		@Override 
		public long skip(long n) throws IOException {
			long totalBytesSkipped = 0L;