question: private static String loadStreamContent ( InputStream stream ) throws IOException { StringBuilder content = new StringBuilder ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream ) ) ; try { char [ ] buff = new char [ 1024 ] ; int i = 0 ; while ( ( i = reader . read ( buff ) ) != - 1 ) { content . append ( buff , 0 , i ) ; } } finally { reader . close ( ) ; } return content . toString ( ) ; }
target:  Loads a file into string