Java Path File Write nio writeEndStringInFile(Path path, String s)

Here you can find the source of writeEndStringInFile(Path path, String s)

Description

write End String In File

License

Open Source License

Declaration

public static boolean writeEndStringInFile(Path path, String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.FileWriter;
import java.io.IOException;

import java.nio.file.Path;

public class Main {
    public static boolean writeEndStringInFile(Path path, String s) {
        FileWriter writer;/*from w w  w  .j  a  v  a 2 s  .  com*/
        try {
            writer = new FileWriter(path.toFile(), true);
            writer.write(s + "\n");
            writer.close();
            return true;
        } catch (IOException e) {
            e.printStackTrace();
            return false;
        }
    }
}

Related

  1. write(Object obj, String filePath)
  2. write(Path p)
  3. write(Path p, String s)
  4. write(Path path, String string)
  5. writeAudio(String source, String writePath)
  6. writeFile(String filePath, String text)
  7. writeFile(String path, String output)
  8. writeFile(String payload, Path balOutPath)
  9. writeFileToArchive(final ZipOutputStream zos, final Path baseSrcPath, final Path filePath)