public static void copy(final InputStream input, final Writer output, final Charset inputEncoding)
            throws IOException {
        final InputStreamReader in = new InputStreamReader(input, Charsets.toCharset(inputEncoding));
        copy(in, output);
    }
Copies bytes from an <code>InputStream</code> to chars on a
<code>Writer</code> using the specified character encoding.
<p>
This method buffers the input internally, so there is no need to use a
<code>BufferedInputStream</code>.
<p>
This method uses {@link InputStreamReader}.

@param input the <code>InputStream</code> to read from
@param output the <code>Writer</code> to write to
@param inputEncoding the encoding to use for the input stream, null means platform default
@throws NullPointerException if the input or output is null
@throws IOException          if an I/O error occurs
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/IOUtils.java