public static String toString(InputStream input, Charset encoding) throws IOException {
        StringWriter sw = new StringWriter();
        copy(input, sw, encoding);
        return sw.toString();
    }
Get the contents of an <code>InputStream</code> as a String
using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
</p>

@param input    the <code>InputStream</code> to read from
@param encoding the encoding to use, null means platform default
@return the requested String
@throws NullPointerException if the input is null
@throws IOException          if an I/O error occurs
@since 2.3
pay-java-common/src/main/java/com/egzosn/pay/common/util/IOUtils.java