code: public static void append(File file, Object text, String charset) throws IOException {
          Writer writer = null;
          try {
              FileOutputStream out = new FileOutputStream(file, true);
              if (!file.exists()) {
                  writeUTF16BomIfRequired(charset, out);
              }
              writer = new OutputStreamWriter(out, charset);
              InvokerHelper.write(writer, text);
              writer.flush();
  
              Writer temp = writer;
              writer = null;
              temp.close();
          } finally {
              closeWithWarning(writer);
          }
      }
docs: Append the text at the end of the File, using a specified encoding.
  
  @param file    a File
  @param text    the text to append at the end of the File
  @param charset the charset used
  @throws IOException if an IOException occurs.
  @since 1.0