propagate exceptions

This commit is contained in:
Athou
2013-04-11 12:49:54 +02:00
parent 53ee8f1428
commit 25dd0aab51
3 changed files with 19 additions and 14 deletions

View File

@@ -1,7 +1,10 @@
package com.commafeed.backend;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.params.CookiePolicy;
@@ -18,7 +21,8 @@ public class HttpGetter {
return new String(getBinary(url), "UTF-8");
}
public byte[] getBinary(String url) throws Exception {
public byte[] getBinary(String url) throws ClientProtocolException,
IOException {
byte[] content = null;
HttpClient httpclient = new DefaultHttpClient();