@@ -389,6 +389,8 @@ private static InputStreamReader getInputStreamReader( File file, String encodin
389389 * @param fileName The path of the file to write.
390390 * @param data The content to write to the file.
391391 * @throws IOException if any
392+ * @deprecated use {@code java.nio.files.Files.write(filename, data.getBytes(encoding),
393+ * StandardOpenOption.APPEND, StandardOpenOption.CREATE)}
392394 */
393395 public static void fileAppend ( String fileName , String data )
394396 throws IOException
@@ -403,11 +405,14 @@ public static void fileAppend( String fileName, String data )
403405 * @param encoding The encoding of the file.
404406 * @param data The content to write to the file.
405407 * @throws IOException if any
408+ * @deprecated use {@code java.nio.files.Files.write(filename, data.getBytes(encoding),
409+ * StandardOpenOption.APPEND, StandardOpenOption.CREATE)}
406410 */
407411 public static void fileAppend ( String fileName , String encoding , String data )
408412 throws IOException
409413 {
410- try ( OutputStream out = Files .newOutputStream ( Paths .get (fileName ), StandardOpenOption .APPEND ) )
414+ try ( OutputStream out = Files .newOutputStream ( Paths .get (fileName ),
415+ StandardOpenOption .APPEND , StandardOpenOption .CREATE ) )
411416 {
412417 if ( encoding != null )
413418 {
0 commit comments