1. public static String executeHttpGet(String requestURL) throws URISyntaxException, ClientProtocolException, IOException {
  2.     BufferedReader in = null;
  3.     String result = "";
  4.     try {
  5.         HttpClient client = new DefaultHttpClient();
  6.         HttpGet request = new HttpGet();
  7.         request.setURI(new URI(requestURL));
  8.         Log.i("requesting", requestURL);
  9.         HttpResponse response = client.execute(request);
  10.         in = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
  11.         StringBuffer sb = new StringBuffer("");
  12.         String line = "";
  13.         String NL = System.getProperty("line.separator");
  14.         while ((line = in.readLine()) != null) {
  15.             sb.append(line + NL);
  16.         }
  17.         in.close();
  18.         result = sb.toString();
  19.     } finally {
  20.         try
  21.         {
  22.             in.close();
  23.         }
  24.         catch(NullPointerException e)
  25.         {
  26.             //
  27.         }
  28.     }
  29.     return result;
  30. }