private static void displayTextInputStream ( InputStream input ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( input ) ) ; while ( true ) { String line = reader . readLine ( ) ; if ( line == null ) break ; System . out . println ( " " + line ) ; } System . out . println ( ) ; }
Displays the contents of the specified input stream as text .