public static long copy(final InputStream input, final OutputStream output, final int bufferSize)
            throws IOException {
        return copyLarge(input, output, new byte[bufferSize]);
    }
Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the
given size.
<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 output the <code>OutputStream</code> to write to
@param bufferSize the bufferSize used to copy from the input to the output
@return the number of bytes copied
@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