/** * Writes a character sequence (such as a string) to a file using the given character set. * * @param from the character sequence to write * @param to the destination file * @param charset the charset used to encode the output stream; see {@link StandardCharsets} for * helpful predefined constants * @throws IOException if an I/O error occurs * @deprecated Prefer {@code asCharSink(to, charset).write(from)}. This method is scheduled to be * removed in January 2019. */ @Deprecated public static void write(CharSequence from, File to, Charset charset) throws IOException { asCharSink(to, charset).write(from); }
/** * Appends a character sequence (such as a string) to a file using the given character set. * * @param from the character sequence to append * @param to the destination file * @param charset the charset used to encode the output stream; see {@link StandardCharsets} for * helpful predefined constants * @throws IOException if an I/O error occurs * @deprecated Prefer {@code asCharSink(to, charset, FileWriteMode.APPEND).write(from)}. This * method is scheduled to be removed in January 2019. */ @Deprecated public static void append(CharSequence from, File to, Charset charset) throws IOException { asCharSink(to, charset, FileWriteMode.APPEND).write(from); }