Updated to have BufferedReader read multi-line. Use StringBuilder as the String's value is modified often.