Creating BufferedReader to read URL causing error: Unable to start activity
===

I am trying to read the content of a URL. The initialization of the BufferedReader keeps causing the crash.

I've tried looking up peoples' solutions, but no matter what I do, I get this error.

Here is my code:

     try {
            String sUrl = "http://www.google.com";
            System.out.println("About to create URL.");
            URL url = new URL(sUrl);
            System.out.println("Created URL");
            
            System.out.println("About to create URLConnection");
            URLConnection urlc = url.openConnection();
            System.out.println("Created URLConnection");
            
            System.out.println("About to create the BufferedReader");
            BufferedReader bR = new BufferedReader(new 
				InputStreamReader(urlc.getInputStream()));
            System.out.println("Created the BufferedReader");

            System.out.println("About to create a StringBuilder");
            StringBuilder sBuilder = new StringBuilder();
            System.out.println("Created StringBuilder");
            
            int byteRead;
            System.out.println("About to enter while loop and build string");
            while ((byteRead = bR.read()) != -1)
            {
                sBuilder.append((char) byteRead);
            }
            System.out.println("Built string");
            
            bR.close();
            System.out.println("Buffered reader is closed");
            String text = sBuilder.toString();
            System.out.println(text);
    } 
    catch (IOException e) 
    {
	//
    }

And here are (some of) the logs I get:

    07-24 13:56:17.546: I/System.out(1554): About to create URL.
    07-24 13:56:17.557: I/System.out(1554): Created URL
    07-24 13:56:17.557: I/System.out(1554): About to create URLConnection
    07-24 13:56:17.557: I/System.out(1554): Created URLConnection
    07-24 13:56:17.557: I/System.out(1554): About to create the BufferedReader
    07-24 13:56:17.576: D/AndroidRuntime(1554): Shutting down VM
    07-24 13:56:17.576: W/dalvikvm(1554): threadid=1: thread exiting with uncaught exception   
                                          (group=0x40a13300)
    07-24 13:56:17.606: E/AndroidRuntime(1554): FATAL EXCEPTION: main
    07-24 13:56:17.606: E/AndroidRuntime(1554): java.lang.RuntimeException: Unable to start 
                                         activity ComponentInfo{com. ... 


Thanks in advance.