If you're going to get text from a BufferedReader, you'd better read the tutorials and look at the examples, since the way to tell when the Stream is done, is it spits out a null, and your code had best be ready for this eventuality. e.g.,
BufferedReader in = ....;
String inputLine = "";
// test for null here when reading in from the Reader
while ((inputLine = in.readLine()) != null) {
// use inputLine here
}
// close BufferedReader here, usually in a finally block