Java File Write nio writeFile(String filename, byte file[])

Here you can find the source of writeFile(String filename, byte file[])

Description

write File

License

Open Source License

Declaration

public static void writeFile(String filename, byte file[]) throws Exception 

Method Source Code


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

import java.nio.file.*;

public class Main {
    public static void writeFile(String filename, byte file[]) throws Exception {
        java.nio.file.Path p = Paths.get(filename, new String[0]);
        Files.write(p, file, new OpenOption[] { StandardOpenOption.CREATE });
    }/* ww w . j  a  v a2 s .  c  o m*/
}

Related

  1. writeFile(File file, String content)
  2. writeFile(File file, String text)
  3. writeFile(FileObject fileObject, String content)
  4. writeFile(List content, String targetFile)
  5. writeFile(OutputStream file, List data)
  6. writeFile(String fileName, String content)
  7. writeFile(String fileName, String content)
  8. writeFile(String folder, String aFileName, String aItem)
  9. writeFile(String name, String content)