List of usage examples for java.net UnknownServiceException UnknownServiceException
public UnknownServiceException()
From source file:kr.pe.javarss.mybus.task.GBusPageParser.java
public static InputStream getPageInputStream(String url) throws IOException { // : 30 ? HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(params, CONNECTION_TIMEOUT); HttpConnectionParams.setSoTimeout(params, CONNECTION_TIMEOUT); HttpClient hc = new DefaultHttpClient(params); HttpResponse res = hc.execute(new HttpGet(url)); if (res.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { throw new UnknownServiceException(); }/*from w w w .java 2s. c o m*/ return res.getEntity().getContent(); }