static int returnCodeHttpHEADWithTimeout_passOnExceptions(int timeout, String url) ctex { url = absoluteURL(url); HttpURLConnection conn = null; InputStream in = null; try { conn = (HttpURLConnection) new URL(url).openConnection(); setURLConnectionTimeouts(conn, timeout); conn.setRequestMethod("HEAD"); conn.setRequestProperty("X-No-Cookies", "1"); in = conn.getInputStream(); ret conn.getResponseCode(); } finally { closeURLConnection(conn, in); } }