code: public static URLConnection openURLConnection(URL url, int timeout) throws IOException {
  		URLConnection huc = url.openConnection();
  		huc.setReadTimeout(timeout);
  		huc.setConnectTimeout(timeout);
  		return huc;
  	}
docs: Open HttpURLConnection. Recommended way to open URL connections in Java 1.7 and 1.8.
  https://eventuallyconsistent.net/2011/08/02/working-with-urlconnection-and-timeouts/
  @param url URL to open
  @param timeout timeout in milli seconds
  @throws IOException an error in opening the URL