Here you can find the source of is200(final String url)
public static boolean is200(final String url)
//package com.java2s; //License from project: Open Source License import java.net.HttpURLConnection; import java.net.URL; public class Main { public static boolean is200(final String url) { HttpURLConnection con = null; try {/* ww w . ja v a 2 s. c o m*/ con = (HttpURLConnection) new URL(url).openConnection(); return (con.getResponseCode() == 200); } catch (Exception e) { return false; } finally { if (con != null) { con.disconnect(); } } } }