io/src/main/java/com/stanfy/enroscar/io/IoUtils.java
public static String streamToString(final InputStream stream, final String charset, final BuffersPool buffersPool) throws IOException {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    transfer(stream, output, buffersPool);
    return new String(output.toByteArray(), charset);
  }
public static String streamToString(final InputStream stream, final String charset, final BuffersPool buffersPool) throws IOException {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    transfer(stream, output, buffersPool);
    return new String(output.toByteArray(), charset);
  }
Read all the bytes from input stream and convert them to a string.
Input stream is closed after this method invocation.
@param stream input stream
@param charset input characters set name
@param buffersPool buffers pool instance, may be null
@return string
@throws IOException if an error happens