/** * Append the text supplied by the Writer at the end of the File without writing a BOM, * using a specified encoding. * * @param file a File * @param writer the Writer supplying the text to append at the end of the File * @param charset the charset used * @throws IOException if an IOException occurs. * @since 2.3.0 */ public static void append(Path file, Writer writer, String charset) throws IOException { appendBuffered(file, writer, charset, false); }
/** * Append the text supplied by the Reader at the end of the File, using a specified encoding. * If the given charset is "UTF-16BE" or "UTF-16LE" (or an equivalent alias), * <code>writeBom</code> is <code>true</code>, and the file doesn't already * exist, the requisite byte order mark is written to the file before the * text is appended. * * @param file a File * @param reader the Reader supplying the text to append at the end of the File * @param charset the charset used * @param writeBom whether to write the BOM * @throws IOException if an IOException occurs. * @since 2.5.0 */ public static void append(Path file, Reader reader, String charset, boolean writeBom) throws IOException { appendBuffered(file, reader, charset, writeBom); }
/** * Append the text supplied by the Writer at the end of the File, using a specified encoding. * If the given charset is "UTF-16BE" or "UTF-16LE" (or an equivalent alias), * <code>writeBom</code> is <code>true</code>, and the file doesn't already * exist, the requisite byte order mark is written to the file before the * text is appended. * * @param file a File * @param writer the Writer supplying the text to append at the end of the File * @param charset the charset used * @param writeBom whether to write the BOM * @throws IOException if an IOException occurs. * @since 2.5.0 */ public static void append(Path file, Writer writer, String charset, boolean writeBom) throws IOException { appendBuffered(file, writer, charset, writeBom); }
/** * Append the text supplied by the Reader at the end of the File, using a specified encoding. * If the given charset is "UTF-16BE" or "UTF-16LE" (or an equivalent alias), * <code>writeBom</code> is <code>true</code>, and the file doesn't already * exist, the requisite byte order mark is written to the file before the * text is appended. * * @param file a File * @param reader the Reader supplying the text to append at the end of the File * @param writeBom whether to write the BOM * @throws IOException if an IOException occurs. * @since 2.5.0 */ public static void append(Path file, Reader reader, boolean writeBom) throws IOException { appendBuffered(file, reader, Charset.defaultCharset().name(), writeBom); }