import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

public class ExampleRunner {

    private static final String TEXT_TESTHTTP = "http://www.google.com/";
    private static final String TEXT_TESTFILE1 = "twl.utf8.txt";
    private static final String TEXT_TESTFILE2 = "csw.utf8.txt";

    /**
     * @param args
     */
    public static void main(String[] args) {

	// Uncomment the example to run

	// example_test_url_file();
	// example_test_url_http();
	example_streamsearch();

    }

    public static void example_streamsearch() {
	new StreamSearchExample();
    }

    /**
     * Example use of IStreamObjectRecievable
     */
    public static void example_test_url_file() {

	File file = new File(TEXT_TESTFILE2);
	try {
	    URL url = file.toURI().toURL();
	    MyUrlReaderExample url_reader = new MyUrlReaderExample(url);
	    url_reader.print2Console();
	} catch (MalformedURLException e) {
	    System.out.println("Error! Malformed URL.");
	}

	System.out.println("Test File URL finished.");

    }

    /**
     * Example use of IStreamObjectRecievable
     */
    public static void example_test_url_http() {

	try {
	    URL url = new URL(TEXT_TESTHTTP);
	    MyUrlReaderExample url_reader = new MyUrlReaderExample(url);
	    url_reader.print2Console();
	} catch (MalformedURLException e) {
	    System.out.println("Error! Malformed URL.");
	}

	System.out.println("Test HTTP URL finished.");

    }

    /**
     * Example use of Temperature Library
     */
    /*
     * public static void example_temperature() { Temperature t1 =
     * Temperature.fromCelsius(-273.15); Temperature t2 =
     * Temperature.fromKelvin(0.0); System.out.println("Kelvin degrees    : " +
     * t1.toKelvin() + "\n" + "Celsius degrees   : " + t1.toCelsius() + "\n" +
     * "Delisle degrees   : " + t1.toDelisle() + "\n" + "Newton degrees    : " +
     * t1.toNewton() + "\n" + "Rankine degrees   : " + t1.toRankine() + "\n" +
     * "Reaumur degrees   : " + t1.toReaumur() + "\n" + "Fahrenheit degrees: " +
     * t1.toFahrenheit() + "\n" + "Romer degrees     : " + t1.toRomer() + "\n");
     * System.out.println("Kelvin degrees    : " + t2.toKelvin() + "\n" +
     * "Celsius degrees   : " + t2.toCelsius() + "\n" + "Delisle degrees   : " +
     * t2.toDelisle() + "\n" + "Newton degrees    : " + t2.toNewton() + "\n" +
     * "Rankine degrees   : " + t2.toRankine() + "\n" + "Reaumur degrees   : " +
     * t2.toReaumur() + "\n" + "Fahrenheit degrees: " + t2.toFahrenheit() + "\n"
     * + "Romer degrees     : " + t2.toRomer() + "\n"); }
     */

}
@@ -1508,1161 +1508,7 @@
  %7D%0D%0A
+%7D
 %0D%0A
-    /**%0D%0A     * Example use of Temperature Library%0D%0A     */%0D%0A    /*%0D%0A     * public static void example_temperature() %7B Temperature t1 =%0D%0A     * Temperature.fromCelsius(-273.15); Temperature t2 =%0D%0A     * Temperature.fromKelvin(0.0); System.out.println(%22Kelvin degrees    : %22 +%0D%0A     * t1.toKelvin() + %22%5Cn%22 + %22Celsius degrees   : %22 + t1.toCelsius() + %22%5Cn%22 +%0D%0A     * %22Delisle degrees   : %22 + t1.toDelisle() + %22%5Cn%22 + %22Newton degrees    : %22 +%0D%0A     * t1.toNewton() + %22%5Cn%22 + %22Rankine degrees   : %22 + t1.toRankine() + %22%5Cn%22 +%0D%0A     * %22Reaumur degrees   : %22 + t1.toReaumur() + %22%5Cn%22 + %22Fahrenheit degrees: %22 +%0D%0A     * t1.toFahrenheit() + %22%5Cn%22 + %22Romer degrees     : %22 + t1.toRomer() + %22%5Cn%22);%0D%0A     * System.out.println(%22Kelvin degrees    : %22 + t2.toKelvin() + %22%5Cn%22 +%0D%0A     * %22Celsius degrees   : %22 + t2.toCelsius() + %22%5Cn%22 + %22Delisle degrees   : %22 +%0D%0A     * t2.toDelisle() + %22%5Cn%22 + %22Newton degrees    : %22 + t2.toNewton() + %22%5Cn%22 +%0D%0A     * %22Rankine degrees   : %22 + t2.toRankine() + %22%5Cn%22 + %22Reaumur degrees   : %22 +%0D%0A     * t2.toReaumur() + %22%5Cn%22 + %22Fahrenheit degrees: %22 + t2.toFahrenheit() + %22%5Cn%22%0D%0A     * + %22Romer degrees     : %22 + t2.toRomer() + %22%5Cn%22); %7D%0D%0A     */%0D%0A%0D%0A%7D

Update ExampleRunner.java