Here you can find the source of writeToFile(Path absolutePath, byte[] content)
public static void writeToFile(Path absolutePath, byte[] content) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; import java.nio.file.*; public class Main { public static void writeToFile(Path absolutePath, byte[] content) throws IOException { try (FileOutputStream fos = new FileOutputStream(absolutePath.toString())) { fos.write(content);//from ww w . j ava2 s.co m } } }