I am trying to test a list of ip addresses in a local network. Currently the way I do it is by passing each ip through the following method:
Code Java:public static void testURL(String strUrl) throws Exception { try { URL url = new URL(strUrl); HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); urlConn.connect(); assertEquals(HttpURLConnection.HTTP_OK, urlConn.getResponseCode()); } catch (IOException e) { System.err.println("Error creating HTTP connection"); e.printStackTrace(); throw e; } }
since i m going from 0 to 255, the whole process takes like an hour to finish, so I was wondering is there a way to check, which is faster than that?
