/**
 * Copyright (c) 2014, Oracle America, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of conditions 
 * and the following disclaimer.
 * 
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 
 * and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * 
 * Neither the name of Oracle nor the names of its contributors may be used to endorse or promote 
 * products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */

package cmdProjectorControl;

import java.net.*;
import java.io.*;

/** Source code for the URLReader class was originally obtained from: 
 *          http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html
 *  and is used under the Code Sample License:
 *  		http://www.oracle.com/technetwork/licenses/bsd-license-1835287.html
 * 
 * Modified by Joel Gibson.
 * 
*/
public class URLReader {
	
    public static void main(String[] args) throws Exception {

        URL oracle = new URL("http://www.oracle.com/");
        BufferedReader in = new BufferedReader(
        new InputStreamReader(oracle.openStream()));

        String inputLine;
        while ((inputLine = in.readLine()) != null)
            System.out.println(inputLine);
        in.close();
    }
    
	public String Reader(String site, int timeout) {
		  
		try {
		
			// instantiate a new URL object
	        URL siteURL = new URL(site);
	        // open a connection to the URL
	        URLConnection conn = siteURL.openConnection();
	        // set the connection timeout value (throws java.net.SocketTimeoutException)
	        conn.setReadTimeout(timeout);
	  	        
	        BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
	        	        
	        String inputLine;
	        String response = "";
	        while ((inputLine = in.readLine()) != null)
	        	response = response + inputLine + "\n";
	            //System.out.println(inputLine);
	        in.close();
	    
	        System.out.println(response);
	        
		    return response;

		} catch (java.net.ConnectException e) {
		      System.out.println("Connection Failed");
		      System.exit(1);
		  
		} catch (java.net.SocketTimeoutException e) {
			  System.out.println("Connection Timeout");
			  System.exit(1);
		      
		} catch (Exception e) {
			System.out.println(e.toString());
		    System.exit(1);
		 
		} 
		
		return null;

	        
	}	
    
    
    
}

@@ -3130,16 +3130,139 @@
 ponse;%0A%0A
+%09%09%7D catch (java.net.SocketTimeoutException e) %7B%0A%09%09%09  System.out.println(%22Connection Timeout%22);%0A%09%09%09  System.exit(1);%0A%09%09    %0A
 %09%09%7D catc
@@ -3372,16 +3372,18 @@
 1);%0A%09%09  
+  
 %0A%09%09%7D cat
@@ -3391,33 +3391,31 @@
 h (java.
-net.SocketTimeout
+io.FileNotFound
 Exceptio
@@ -3446,34 +3446,68 @@
 rintln(%22
-Connection Timeout
+Status Page Not Found - Please check the IP address.
 %22);%0A%09%09%09 
@@ -3580,16 +3580,32 @@
 println(
+%22Exception: %22 + 
 e.toStri

Update URLReader.java