Here you can find the source of isResponsive(URL url)
public static boolean isResponsive(URL url)
//package com.java2s; //License from project: LGPL import java.io.IOException; import java.net.*; public class Main { public static boolean isResponsive(URL url) { try {/*from ww w . j av a 2s .co m*/ HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection(); httpConnection.setRequestMethod("HEAD"); httpConnection.setConnectTimeout(1000); httpConnection.setReadTimeout(1000); return httpConnection.getResponseCode() == 200; } catch (IOException ioe) { return false; } } }