private String readLine ( InputStream stream ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream ) ) ; return reader . readLine ( ) ; }
This will read a single line from the input stream as a string .