List of usage examples for com.liferay.portal.kernel.util HttpUtil URLtoInputStream
public static InputStream URLtoInputStream(String location) throws IOException
From source file:com.liferay.rss.web.internal.util.RSSWebCacheItem.java
License:Open Source License
private InputStream _readURL() throws IOException { URL url = new URL(_url); if ("file".equals(url.getProtocol())) { return url.openStream(); }/* www .ja v a 2 s . co m*/ Http.Options options = new Http.Options(); options.setLocation(_url); options.setTimeout(PropsValues.RSS_CONNECTION_TIMEOUT); return HttpUtil.URLtoInputStream(options); }