private boolean testURL(String urlString) {
    	boolean result = true;
		HttpURLConnection httpConnection = null;
		try {
			URL url = new URL(urlString);
			httpConnection = (HttpURLConnection) url.openConnection();
			httpConnection.getContent();
			httpConnection.disconnect();
			httpConnection = null;
		} catch (UnknownHostException ex) {
			result = false;
		} catch (IOException ex) {
			result = false;
		} finally {
			// cleanup
			if (httpConnection != null)
				httpConnection.disconnect();
		}
		return result;
    }
private boolean testURL ( String urlString ) { boolean result = true ; HttpURLConnection httpConnection = null ; try { URL url = new URL ( urlString ) ; httpConnection = ( HttpURLConnection ) url . openConnection ( ) ; httpConnection . getContent ( ) ; httpConnection . disconnect ( ) ; httpConnection = null ; } catch ( UnknownHostException ex ) { result = false ; } catch ( IOException ex ) { result = false ; } finally { if ( httpConnection != null ) httpConnection . disconnect ( ) ; } return result ; }
Check if a given URL is accessible and if the page exists.

@param urlString
@return