RTEditor/src/main/java/com/onegravity/rteditor/utils/io/IOUtils.java
public static void write(byte[] data, Writer output, Charset encoding) throws IOException {
        if (data != null) {
            output.write(new String(data, Charsets.toCharset(encoding)));
        }
    }
public static void write(byte[] data, Writer output, Charset encoding) throws IOException {
        if (data != null) {
            output.write(new String(data, Charsets.toCharset(encoding)));
        }
    }
public static void write ( byte [ ] data , Writer output , Charset encoding ) throws IOException { if ( data != null ) { output . write ( new String ( data , Charsets . toCharset ( encoding ) ) ) ; } }
Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code>
using the specified character encoding.
<p/>
This method uses {@link String#String(byte[], String)}.

@param data     the byte array to write, do not modify during output,
null ignored
@param output   the <code>Writer</code> to write to
@param encoding the encoding to use, null means platform default
@throws NullPointerException if output is null
@throws IOException          if an I/O error occurs
@since 2.3
Writes bytes from a <code > byte [] < / code > to chars on a <code > Writer< / code > using the specified character encoding . <p / > This method uses { @link String#String ( byte [] String ) } .