public static void writeStringToFile(final File file, final String data, final Charset encoding)
            throws IOException {
        writeStringToFile(file, data, encoding, false);
    }
Writes a String to a file creating the file if it does not exist.
<p>
NOTE: As from v1.3, the parent directories of the file will be created
if they do not exist.

@param file     the file to write
@param data     the content to write to the file
@param encoding the encoding to use, {@code null} means platform default
@throws IOException                          in case of an I/O error
@throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/utils/FileUtils.java