question: public static int ping ( String url ) throws Exception { URL u = new URL ( url ) ; HttpURLConnection c = ( HttpURLConnection ) u . openConnection ( ) ; c . connect ( ) ; int code = c . getResponseCode ( ) ; log . debug ( "ping=" + url + ", response.code=" + code ) ; c . disconnect ( ) ; return code ; }
target:  ping the url, throw exception if occur error