code: public void getDataFromClient(HttpRequestBase httpget, OutputStream streamOut) throws ClientProtocolException, IOException
      {
      	HttpClient httpclient = new DefaultHttpClient();
      	     	 
      	 // Execute the request
      	 HttpResponse response = httpclient.execute(httpget);
      	 
      	 // Get the response entity
      	 HttpEntity entity = response.getEntity();
      	 
      	 if (entity != null)
      	 {
  	    	 InputStream instream = entity.getContent();
  	    	    	 
  		     ProxyServlet.transferURLStream(instream, streamOut);
  	
  	         // Closing the input stream will trigger connection release
  	         instream.close();
  	    	         	     
  	         // There is probably a less resource intensive way to do this.
  	         httpclient.getConnectionManager().shutdown();
      	 }
      }
docs: Get the data from the proxy and send it to the client.
  @param httpget
  @param streamOut
  @throws IOException
  @throws ClientProtocolException