public static String streamToString ( final InputStream stream , final BuffersPool buffersPool ) throws IOException { return streamToString ( stream , UTF_8_NAME , buffersPool ) ; }
Read all the bytes from input stream and convert them to a string using UTF - 8 charset . Input stream is closed after this method invocation .