Class FileUtils


  • public class FileUtils
    extends Object
    • Constructor Detail

      • FileUtils

        public FileUtils()
    • Method Detail

      • writeAtomic

        public static void writeAtomic​(Path file,
                                       byte[] bytes)
                                throws IOException
        Writes bytes to a file in two phases via a temporary file in the same folder. This will either succeed or fail and leave the original file in place.
        Throws:
        IOException