Here you can find the source of writeFileContents(Path to, byte[] contents)
public static void writeFileContents(Path to, byte[] contents) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void writeFileContents(Path to, byte[] contents) throws IOException { Files.write(to, contents); }//from ww w. j a v a 2 s. c om }