static InputStream urlConnection_getInputStream(URLConnection con) throws IOException { repeat 2 { try { ret con.getInputStream(); } catch (UnknownHostException e) { print("Retrying because of: " + e); continue; } } }