Code example for HttpGet

Methods: abort

0
	} 
 
	public static List<Entry> parse(String url) {
		DefaultHttpClient httpClient = createHttpClient();
 
		HttpGet get = new HttpGet(url);
 
		try { 
			String body = httpClient.execute(get, sHandler);
 
			// Logger.d(body); 
 
			writeToFile(body);
 
			return parseText(body);
 
			// return Collections.emptyList(); 
		} catch (ClientProtocolException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
			get.abort();
		} catch (IOException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
			get.abort();
		} finally { 
			httpClient.getConnectionManager().shutdown();
		} 
		List<Entry> empty = Collections.emptyList();
		return empty;